Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds deafult graph keys in dao data #501

Merged
merged 1 commit into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions libs/moloch-v3-data/src/daos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
import {
ENDPOINTS,
getGraphUrl,
GRAPH_API_KEYS,
Keychain,
ValidNetwork,
} from '@daohaus/keychain-utils';
Expand All @@ -35,7 +36,7 @@ import { listTokenBalances } from './vaults';
export const findDao = async ({
networkId,
dao,
graphApiKeys,
graphApiKeys = GRAPH_API_KEYS,
includeTokens = false,
}: {
networkId: ValidNetwork;
Expand Down Expand Up @@ -139,7 +140,7 @@ export const listDaos = async ({
pageSize: DEFAULT_RECORDS_PER_PAGE,
offset: 0,
},
graphApiKeys,
graphApiKeys = GRAPH_API_KEYS,
}: IListQueryArguments<Dao_OrderBy, Dao_Filter>): Promise<
IListQueryResults<Dao_OrderBy, Dao_Filter, ListDaosQueryResDaos>
> => {
Expand Down
15 changes: 10 additions & 5 deletions libs/moloch-v3-data/src/members.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ import {
IListQueryArguments,
IListQueryResults,
} from '@daohaus/data-fetch-utils';
import { getGraphUrl, Keychain, ValidNetwork } from '@daohaus/keychain-utils';
import {
getGraphUrl,
GRAPH_API_KEYS,
Keychain,
ValidNetwork,
} from '@daohaus/keychain-utils';
import { nowInSeconds, MolochV3MembershipQuery } from '@daohaus/utils';
import {
Dao_Filter,
Expand Down Expand Up @@ -39,7 +44,7 @@ export const findMember = async ({
networkId,
dao,
memberAddress,
graphApiKeys,
graphApiKeys = GRAPH_API_KEYS,
}: {
networkId: ValidNetwork;
dao: string;
Expand Down Expand Up @@ -80,7 +85,7 @@ export const listMembers = async ({
pageSize: DEFAULT_RECORDS_PER_PAGE,
offset: 0,
},
graphApiKeys,
graphApiKeys = GRAPH_API_KEYS,
}: IListQueryArguments<Member_OrderBy, Member_Filter>): Promise<
IListQueryResults<Member_OrderBy, Member_Filter, ListMembersQuery['members']>
> => {
Expand Down Expand Up @@ -122,7 +127,7 @@ export const listDaosByMember = async ({
orderDirection: 'desc',
},
networkIds,
graphApiKeys,
graphApiKeys = GRAPH_API_KEYS,
}: ICrossNetworkMemberListArguments<
Dao_OrderBy,
Dao_Filter,
Expand Down Expand Up @@ -170,7 +175,7 @@ export const listProposalVotesByMember = async ({
pageSize: DEFAULT_RECORDS_PER_PAGE,
offset: 0,
},
graphApiKeys,
graphApiKeys = GRAPH_API_KEYS,
}: IListQueryArguments<Proposal_OrderBy, Proposal_Filter> & {
memberAddress: string;
}): Promise<
Expand Down
9 changes: 7 additions & 2 deletions libs/moloch-v3-data/src/proposals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ import {
IListQueryArguments,
IListQueryResults,
} from '@daohaus/data-fetch-utils';
import { getGraphUrl, Keychain, ValidNetwork } from '@daohaus/keychain-utils';
import {
getGraphUrl,
GRAPH_API_KEYS,
Keychain,
ValidNetwork,
} from '@daohaus/keychain-utils';
import {
ListVotesDocument,
ListVotesQuery,
Expand Down Expand Up @@ -37,7 +42,7 @@ export const findProposal = async ({
dao,
proposalId,
connectedAddress,
graphApiKeys,
graphApiKeys = GRAPH_API_KEYS,
}: {
networkId: ValidNetwork;
dao: string;
Expand Down
11 changes: 8 additions & 3 deletions libs/moloch-v3-data/src/records.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ import {
IListQueryArguments,
IListQueryResults,
} from '@daohaus/data-fetch-utils';
import { getGraphUrl, Keychain, ValidNetwork } from '@daohaus/keychain-utils';
import {
getGraphUrl,
GRAPH_API_KEYS,
Keychain,
ValidNetwork,
} from '@daohaus/keychain-utils';
import {
addParsedContent,
createPaging,
Expand All @@ -30,7 +35,7 @@ import {
export const findRecord = async ({
networkId,
recordId,
graphApiKeys,
graphApiKeys = GRAPH_API_KEYS,
}: {
networkId: ValidNetwork;
recordId: string;
Expand Down Expand Up @@ -72,7 +77,7 @@ export const listRecords = async ({
pageSize: DEFAULT_RECORDS_PER_PAGE,
offset: 0,
},
graphApiKeys,
graphApiKeys = GRAPH_API_KEYS,
}: IListQueryArguments<Record_OrderBy, Record_Filter>): Promise<
IListQueryResults<
Record_OrderBy,
Expand Down
11 changes: 8 additions & 3 deletions libs/moloch-v3-data/src/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ import {
IListQueryArguments,
IListQueryResults,
} from '@daohaus/data-fetch-utils';
import { getGraphUrl, Keychain, ValidNetwork } from '@daohaus/keychain-utils';
import {
getGraphUrl,
GRAPH_API_KEYS,
Keychain,
ValidNetwork,
} from '@daohaus/keychain-utils';
import { createPaging, DEFAULT_RECORDS_PER_PAGE } from './utils';
import {
EventTransaction_Filter,
Expand All @@ -22,7 +27,7 @@ import {
export const findTransaction = async ({
networkId,
txHash,
graphApiKeys,
graphApiKeys = GRAPH_API_KEYS,
}: {
networkId: ValidNetwork;
txHash: string;
Expand Down Expand Up @@ -62,7 +67,7 @@ export const listTransactions = async ({
pageSize: DEFAULT_RECORDS_PER_PAGE,
offset: 0,
},
graphApiKeys,
graphApiKeys = GRAPH_API_KEYS,
}: IListQueryArguments<
EventTransaction_OrderBy,
EventTransaction_Filter
Expand Down
Loading