Skip to content

Throw an error if graphiql uses a restricted route #349

@tusharmath

Description

@tusharmath

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]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions