Apollo-server: cannot disable apollo server gui in browser

Created on 2 Aug 2018  路  1Comment  路  Source: apollographql/apollo-server

  • [x ] feature

I cannot disable apollo server gui in browser.

here codes:

const { ApolloServer } = require('apollo-server-express');     
const schema = require('./graphql');      
const server = new ApolloServer({ schema });  
server.applyMiddleware({  
  app,  
  path: '/gql',  
  bodyParserConfig: bodyParser.json(),  
  gui: null,  
});

I donot want users to find my backgroud graphql list or he will use to hack/analyze my server.
I config with {gui:null} but when access http://localhost:4000/gql, the gui shows again.

How can I remove/disable the browser gui?
(The purpose is to access apollo server only with get/post query string)

Most helpful comment

Sorry ,please close the issue.
I found the solution:
https://www.apollographql.com/docs/apollo-server/features/graphql-playground.html

const server = new ApolloServer({
  schema, 
  introspection: false,
  playground: false,
});

will disable playground gui

>All comments

Sorry ,please close the issue.
I found the solution:
https://www.apollographql.com/docs/apollo-server/features/graphql-playground.html

const server = new ApolloServer({
  schema, 
  introspection: false,
  playground: false,
});

will disable playground gui

Was this page helpful?
0 / 5 - 0 ratings

Related issues

manuelfink picture manuelfink  路  3Comments

nevyn-lookback picture nevyn-lookback  路  3Comments

stevezau picture stevezau  路  3Comments

veeramarni picture veeramarni  路  3Comments

bchehraz picture bchehraz  路  3Comments