Questions tagged [graphql-playground]

52 questions
13
votes
1 answer

GraphQL playground - sending Cookie as Http Header "disappears"

I'm testing some implementations in the GraphQL Playground, in which I want to send a specific cookie, so that I can fetch it in my resolver. I'm using the built in Http Headers pane in the playground: However, when I add headers named either…
Zeliax
  • 4,987
  • 10
  • 51
  • 79
8
votes
1 answer

Is it possible to define the HTTP headers for the GraphQL Playground that comes with Apollo Server?

I want to define some http headers for the GraphQL Playground, to be enabled by default and/or always. Essentially, I want to add: "apollographql-client-name": "playground" "apollographql-client-version": "yada-yada" to be able to distinguish…
Pablo Fernandez
  • 279,434
  • 135
  • 377
  • 622
6
votes
1 answer

GraphQL playground type detail multiline comment?

I am trying to document my APIs using GraphQL. For readability issues, I want to leave comments in multi-line but it doesn't seem to work with regular '\n' newline symbol """ Return:\n true : DB save successful\n false : DB save…
J.S.C
  • 1,323
  • 3
  • 16
  • 22
5
votes
4 answers

Docusaurus v2 and GraphQL Playground integration

I'd like to render GraphQL Playground as a React component in one of my pages but it fails due to missing file-loader in webpack. Is there a way to fix this in docs or do I need to create new plugin with new webpack config? Is it good idea to…
4
votes
2 answers

.Net core 3.1 + GraphQL ==> "error": "Unexpected end of JSON input"

I developed a .net core 3.1 web API and I've added GraphQL and PlayGround to it. When I try to start the Playground I encountered this error that bored me. I googled too many times and I have read many articles and forums about it and I've tried…
Milad Rashidi
  • 1,296
  • 4
  • 22
  • 40
4
votes
1 answer

How can I add a share to GraphQL Bin option to my Apollo server playground?

I am using Apollo server to implement a GraphQL API, which automatically gives me a GraphQL Playground. According to the GraphQL Playground docs I should have (or at least be able to enable) a "Share" feature that will create a GraphQL Bin link…
Calaway
  • 714
  • 6
  • 12
3
votes
1 answer

GraphQL Playground: How to set subscription connectionParams?

I have a secure subscription endpoint on my apollo server. I can send subscription connectionParams from my react client by setting it in the WebSocketLink constructor and verify it in the onConnect property of ApolloServer constructor. But how do I…
3
votes
1 answer

Apollo server timeout message

I'm using apollo server and graphql and it's necessary to set a timeout so I use this with express: const server = app.listen({ port: 4000 }, () => console.log( `The server is running in http://localhost:4000${server.graphqlPath}`)); …
2
votes
1 answer

Nestjs graphql playground "Server cannot be reached"

I have a v9 Nestjs, graphql that works locally without any issues but when deployed on a digital ocean droplet with nginx, accessing playground says Server cannot be reached. And as such the Schema and Doc tabs on the playground don't load. However,…
Nditah
  • 1,429
  • 19
  • 23
2
votes
0 answers

Server Error while using Graphql Playground

I have been following the www.howtographql.com tutorials but i am stuck as i am not able to add authorization token in http headers. As soon as i write the authorization token it gives an error - 'Server cannot be reached' index.js const {…
2
votes
0 answers

GraphQL error: Failed to fetch schema. Please check your connection

Hello guys I am trying to setup an graphql serverless project, but I am having problems running the graphql server, or at least the graphql playground. When I run the server via sls offline start, the playground lunches it cannot reach my schema…
2
votes
1 answer

GraphQL playground for java / Springboot

Is there a GraphQL playground plugin available with springboot. By default graphql-spring-boot-starter gives graphiql UI which looks very basic.
2
votes
1 answer

findUnique query returns null for array fields

I read the Prisma Relations documentation and it fixed my findMany query which is able to return valid data but I'm getting inconsistent results with findUnique. Schema model User { id Int @id @default(autoincrement()) fname …
Ani T
  • 65
  • 2
  • 6
2
votes
2 answers

WebSocket connection to 'wss://api-such.andsuch.xyz/graphql/' failed: Error during WebSocket handshake: Unexpected response code: 400

I recently deployed a project I'm working on to production. I use DjangoChannelsGraphqlWs for GraphQL subscription functionalities. and I have GraphQL Playground set up via django-graphql-playground. Everything works fine locally - there are no…
2
votes
3 answers

When updating a record in FaunaDB, how do I update one field without passing in every field and subobject?

Perhaps I haven't grasped GraphQL yet, but I want to update a complex record in the DB. I'm having trouble finding docs that explain this, which doesn't use a trivial example. I am using FaunaDB and trying to test things in the GraphQL playground…
Ivan
  • 1,093
  • 1
  • 10
  • 15
1
2 3 4