scaphold-io / graphql-extended Goto Github PK
View Code? Open in Web Editor NEWAn extension of graphql-js that adds useful functionality for production graphql deployments.
License: MIT License
An extension of graphql-js that adds useful functionality for production graphql deployments.
License: MIT License
Seems like complexityReducer does not account for fragment spreads.
As Scaphold was shutdown and moved to Amazon or something anyway...
In the example, we have a cost of 0 for scalars and 1 for field. Docs says the complexity for below query is 6
. Should it not be 2
in this case if scalars are 0 and field is 1 complex?
import { execute } from 'graphql-extended'
execute({
schema: built,
document: parse(`
query GetUserAndPosts {
user {
id
username
}
posts(limit: 20) {
name
age
}
}
`),
queryReducers: [ new ComplexityReducer() ],
})
Trying to use this npm dep in my typescript graphql project, and I get the following errors
ERROR in [at-loader] ./node_modules/graphql-extended/build/execution/ExecutionContext.d.ts:14:19
TS2304: Cannot find name 'mixed'.
ERROR in [at-loader] ./node_modules/graphql-extended/build/execution/ExecutionContext.d.ts:17:24
TS2304: Cannot find name 'mixed'.
ERROR in [at-loader] ./node_modules/graphql-extended/build/execution/GraphQLExtResolveInfo.d.ts:3:25
TS2304: Cannot find name 'mixed'.
ERROR in [at-loader] ./node_modules/graphql-extended/build/execution/GraphQLExtResolveInfo.d.ts:3:32
TS2304: Cannot find name 'mixed'.
ERROR in [at-loader] ./node_modules/graphql-extended/build/execution/execute.d.ts:27:24
TS2304: Cannot find name 'mixed'.
ERROR in [at-loader] ./node_modules/graphql-extended/build/execution/execute.d.ts:34:17
TS2304: Cannot find name 'mixed'.
any idea?
I am compiling with the latest tsc
tks
Sorry to ask but I can't figure how to use this package along side express-graphql or even only express.
I thought it was a superset of graphql-js, so I tweaked express-graphql, replacing the graphql imports with graphql-extended.
Nice try, but all tests are failing.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.