Skip to content

GraphiQL set up incorrectly according to docs #179

@jaa134

Description

@jaa134

What you were expecting:
Docs clearly say to register your express server handler at /graphql. Then GraphiQL should work once the server starts.

What happened instead:
GraphiQL loads index.html, but fails to fetch schema or make requests. All requests 404 as they are directed at the wrong handler path.

Steps to reproduce:

  1. Register express server handler using /graphql as path like docs say.
  2. Build/start express server.
  3. Open GraphiQL in web browser
  4. Notice that schema cannot be fetched and queries/mutations fail.

Related code:
See:

  • here --> Should be \graphql or configurable to match a custom path
  • here --> Should be removed

More info
GraphiQL is making requests to the wrong express handler due to a misconfiguration. If I register the handler at the base express path /, then it works fine.

Environment
Node

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions