To enable graphiql we can set a route in the @server config for eg:
schema @server(enableGraphiql: "/graphiql") {
query: Query
mutation: Mutation
}
Before starting the server we should check if the route matches any of the restricted routes for example — / and /graphql.
Incase it does an error should be thrown
message: Cannot use restricted routes '/' for enabling graphiql
trace: [schema, server, enableGraphiql]
To enable graphiql we can set a route in the
@serverconfig for eg:Before starting the server we should check if the route matches any of the restricted routes for example —
/and/graphql.Incase it does an error should be thrown