You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ ] Regression
[ ] Bug report
[x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Apollo Server plugins can get access to the schema via the GraphQLServiceContext that's passed to the serverWillStart plugin hook. Thus, you can create your own plugin that captures the schema and then uses it within didResolveOperation. See this gist for an example plugin, and here's how you use it:
GraphQLModule.forRoot({
autoSchemaFile: "schema.gql",
plugins: [
new ApolloComplexityPlugin(20) // max complexity is 20
]
})
Uh oh!
There was an error while loading. Please reload this page.
I'm submitting a...
Current behavior
To use graphql-query-complexity, we need access to schema. and as we are passing plugins in GraphQLModule options, there's no way to configure this plugin.
Expected behavior
Access schema in plugins configuration.
The text was updated successfully, but these errors were encountered: