docker-compose exec -T <mongodb_service_name> mongodump --archive --gzip --db <mongodb_database> > dump.gz
docker-compose exec -T mongorestore --archive --gzip < dump.gz
| import { ComplexityEstimator, getComplexity } from 'graphql-query-complexity' | |
| import { GraphQLError, GraphQLSchema, separateOperations } from 'graphql' | |
| import { PluginDefinition } from 'apollo-server-core' | |
| export const createComplexityPlugin = ({ | |
| schema, | |
| maximumComplexity, | |
| estimators, | |
| onComplete, | |
| createError = (max, actual) => { throw new GraphQLError(`Query too complex. Value of ${actual} is over the maximum ${max}.`) }, |