Skip to content

Commit

Permalink
indexer-service: Update index-node GraphQL server schema
Browse files Browse the repository at this point in the history
- Update schema filter to include root fields needed by the GraphIX data
comparison and debugging tool
  • Loading branch information
fordN committed Apr 14, 2023
1 parent c9718e5 commit 25b9ac1
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion packages/indexer-service/src/server/status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,24 @@ export const createStatusServer = async ({
fetch,
})

// Filtering the index-node server schema to the queries we want to expose externally
// indexingStatuses - needed by gateways, and explorer
// others are used for debugging data discrepancies
const supportedRootFields = [
'indexingStatuses',
'publicProofsOfIndexing',
'entityChangesInBlock',
'blockData',
'cachedEthereumCalls',
'subgraphFeatures',
'apiVersions',
]
const filteredSchema = wrapSchema({
schema,
transforms: [
new FilterRootFields(
(_operation: 'Query' | 'Mutation' | 'Subscription', rootFieldName: string) =>
rootFieldName === 'indexingStatuses',
supportedRootFields.some(rootField => rootField === rootFieldName),
),
],
})
Expand Down

0 comments on commit 25b9ac1

Please sign in to comment.