Vinnie
12/02/2017, 9:49 AMagartha
12/02/2017, 11:29 AMVinnie
12/02/2017, 1:19 PMagartha
12/02/2017, 1:25 PMVinnie
12/02/2017, 6:40 PMevents.js:183
throw er; // Unhandled 'error' event
^
Error: write after end
at write_ (_http_outgoing.js:625:15)
at ServerResponse.write (_http_outgoing.js:620:10)
at /Users/vincenzo/Documents/Repositories/github/zoo/panda/node_modules/apollo-server-express/src/expressApollo.ts:50:11
at <anonymous>
at process._tickDomainCallback (internal/process/next_tick.js:228:7)
But the playground loads in the browser just fine, but gives me an error that says “failed to fetch”. Then i restart the app whilst the playground is still loaded in the browser, and when I go back to playground it is able to see the schema and run the queries just fineagartha
12/02/2017, 7:02 PMVinnie
12/02/2017, 7:04 PMimport { default as expressPlayground } from 'graphql-playground-middleware-express'
then somewhere else
app.use('/graphql/playground', expressPlayground({
endpointUrl: '/graphql',
}));
agartha
12/02/2017, 7:04 PMapp.use('/playground', expressPlayground(...)
Vinnie
12/02/2017, 7:05 PMagartha
12/02/2017, 7:05 PMVinnie
12/02/2017, 7:06 PMUnexpected token < in JSON at position 1
agartha
12/02/2017, 7:06 PMapp.use('/playground', expressPlayground({ endpointUrl: '/graphql', }));
Vinnie
12/02/2017, 7:07 PMSyntaxError: Unexpected token < in JSON at position 0
at <http://cdn.jsdelivr.net/npm/graphql-playground@1.3.1/build/static/js/middleware.js:1:978882>
at <anonymous>
agartha
12/02/2017, 11:23 PMVinnie
12/02/2017, 11:24 PMagartha
12/02/2017, 11:24 PMVinnie
12/02/2017, 11:25 PMagartha
12/02/2017, 11:27 PMVinnie
12/02/2017, 11:28 PMagartha
12/02/2017, 11:29 PMVinnie
12/02/2017, 11:30 PMagartha
12/02/2017, 11:31 PMVinnie
12/02/2017, 11:31 PMagartha
12/02/2017, 11:31 PMVinnie
12/02/2017, 11:32 PMSyntaxError: Unexpected token < in JSON at position 1
at <http://cdn.jsdelivr.net/npm/graphql-playground@1.3.1/build/static/js/middleware.js:1:978882>
at <anonymous>
agartha
12/02/2017, 11:33 PMhttps://snag.gy/5FYdHQ.jpg▾
Vinnie
12/02/2017, 11:36 PMagartha
12/02/2017, 11:37 PMVinnie
12/02/2017, 11:56 PMagartha
12/02/2017, 11:56 PMVinnie
12/02/2017, 11:56 PMagartha
12/02/2017, 11:57 PMVinnie
12/02/2017, 11:58 PMimport { default as expressPlayground } from 'graphql-playground-middleware-express'
All the examples I see they have things like in yours or like import { express as expressPlayground}
But I had to do import default… is that fine?agartha
12/02/2017, 11:59 PMVinnie
12/02/2017, 11:59 PMimport expressPlayground from ‘graphql-playground-middleware-express’
agartha
12/02/2017, 11:59 PMVinnie
12/02/2017, 11:59 PMagartha
12/03/2017, 12:00 AMVinnie
12/03/2017, 12:00 AMagartha
12/03/2017, 12:01 AMVinnie
12/03/2017, 12:01 AMagartha
12/03/2017, 12:01 AMVinnie
12/03/2017, 12:02 AM