Skip to content

Commit

Permalink
fix: null ipfs
Browse files Browse the repository at this point in the history
  • Loading branch information
sirpy committed Feb 4, 2024
1 parent c15b15e commit 6fac0bb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/app/src/subgraph/useSubgraphCollective.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { SubgraphCollective } from './subgraphModels';

export const collectivesById = gql`
query COLLECTIVES_BY_ID($ids: [String!]) {
collectives(where: { id_in: $ids }) {
collectives(where: { id_in: $ids, ipfs_: { name_not: null } }) {
id
ipfs {
id
Expand Down
3 changes: 2 additions & 1 deletion packages/app/src/subgraph/useSubgraphIpfsCollective.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import { gql } from '@apollo/client';
import { IpfsCollectivesSubgraphResponse, useSubgraphData } from './useSubgraphData';
import { SubgraphIpfsCollective } from './subgraphModels';

// filter by name not null, because it can take time until thegraph index from ipfs, and if ipfs fields are null it will break the query
const allIpfsCollectives = gql`
query IPFS_COLLECTIVES {
collectives {
collectives(where: { ipfs_: { name_not: null } }) {
id
ipfs {
id
Expand Down
4 changes: 4 additions & 0 deletions packages/sdk-js/src/goodcollective/goodcollective.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,18 @@ export type EventData = ProvableNFT.EventDataStruct;
export type PoolSettings = Omit<DirectPaymentsPool.PoolSettingsStruct, 'nftType'> & { nftType?: BigNumberish };
export type PoolLimits = DirectPaymentsPool.SafetyLimitsStruct;
export type SwapData = HelperLibrary.SwapDataStruct;

export type PoolAttributes = {
name: string;
description: string;
headerImage: string;
logo: string;
twitter?: string;
email?: string;
instagram?: string;
threads?: string;
website?: string;
images?: Array<string>;
};
export type SDKOptions = {
network?: string;
Expand Down

0 comments on commit 6fac0bb

Please sign in to comment.