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
macOS 10.13.4
graphql-playground-middleware-koa
I see the complete response in the result window
The result window response does not match the network response, specifically, it swallows the extensions: { duration } object.
extensions: { duration }
https://github.com/jedahan/playground-filtering has a relatively minimal example, which I will copy below
# server.js const Koa = require('koa') const mount = require('koa-mount') const cors = require('@koa/cors') const graphqlHTTP = require('koa-graphql') const koaPlayground = require('graphql-playground-middleware-koa').default const opn = require('opn') const getPort = require('get-port') const app = new Koa() const { buildSchema } = require('graphql') const schema = buildSchema(` type Query { hello: Hello, } type Hello { there: String } type Mutation { setHello(input: HelloInput!): Hello } input HelloInput { there: String! } `) const db = { hello: { there: `General Kenobi!` } } const rootValue = { hello: () => db.hello, setHello: ({ hello }) => { previous = db.hello db.hello = hello return previous } } app.use(cors()) app.use( mount( '/graphql', graphqlHTTP(async (request) => { const start = Date.now() const extensions = ({ document, variables, operationName, result }) => ({ duration: new Date() - start }) return { schema, rootValue, extensions } }) ) ) app.use( mount( '/playground', koaPlayground({ endpoint: '/graphql' }) ) ) getPort({ port: 4000 }).then(port => { app.listen(port, () => { const base = `http://localhost:${port}` console.log(`API: ${base}/graphql`) console.log(`Playground: ${base}/playground`) opn(`${base}/playground`) }) })
The text was updated successfully, but these errors were encountered:
Thanks for reporting @jedahan ! This is already possible, I just added it to the readme: https://github.com/prismagraphql/graphql-playground/blob/master/README.md#settings
Sorry, something went wrong.
No branches or pull requests
This issue pertains to the following package(s):
What OS and OS version are you experiencing the issue(s) on?
macOS 10.13.4
What version of graphql-playground(-electron/-middleware) are you experiencing the issue(s) on?
graphql-playground-middleware-koa
What is the expected behavior?
I see the complete response in the result window
What is the actual behavior?
The result window response does not match the network response, specifically, it swallows the
extensions: { duration }
object.What steps may we take to reproduce the behavior?
https://github.com/jedahan/playground-filtering has a relatively minimal example, which I will copy below
The text was updated successfully, but these errors were encountered: