We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm trying to use graphql-cost-analysis. but it just said costAnalysis is not a function. I can not show you entire code. but it's like this.
costAnalysis is not a function
const { graphqlExpress } = require('graphql-server-express'); const costAnalysis = require('graphql-cost-analysis') ... graphqlExpress(req => { return { schema, rootValue: null, validationRules: [ costAnalysis({ variables: req.body.variables, maximumCost: 10 }), ], } }) ...
and the result of console.log(costAnalysis) is like this.
console.log(costAnalysis)
{ default: [Function: createCostAnalysis] }
What am I missing?
thanks
The text was updated successfully, but these errors were encountered:
const costAnalysis = require('graphql-cost-analysis').default
Sorry, something went wrong.
ahh, thank you!
I tried maximumCost: 1. the result was not what I expected. It seems I need to study more about the configuration.
maximumCost: 1
thank you again.
No branches or pull requests
I'm trying to use graphql-cost-analysis. but it just said
costAnalysis is not a function
.I can not show you entire code. but it's like this.
and the result of
console.log(costAnalysis)
is like this.What am I missing?
thanks
The text was updated successfully, but these errors were encountered: