Skip to content

Commit

Permalink
fix: InMemoryCache possible types resolution (#578)
Browse files Browse the repository at this point in the history
  • Loading branch information
Betree authored Oct 9, 2024
1 parent b2c576d commit ed7e4ea
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/server/lib/graphql.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,16 @@ function getCustomAgent() {
function getClient({ version = 'v1', apiKey } = {}) {
return new ApolloClient({
link: new HttpLink({ uri: getGraphqlUrl({ version, apiKey }), fetch }),
cache: new InMemoryCache(),
cache: new InMemoryCache({
possibleTypes: {
Transaction: ['Expense', 'Order', 'Debit', 'Credit'],
CollectiveInterface: ['Collective', 'Event', 'Project', 'Fund', 'Organization', 'User', 'Vendor'],
Account: ['Collective', 'Host', 'Individual', 'Fund', 'Project', 'Bot', 'Event', 'Organization', 'Vendor'],
AccountWithHost: ['Collective', 'Event', 'Fund', 'Project'],
AccountWithParent: ['Event', 'Project'],
AccountWithContributions: ['Collective', 'Organization', 'Event', 'Fund', 'Project', 'Host'],
},
}),
});
}

Expand Down

0 comments on commit ed7e4ea

Please sign in to comment.