Skip to content

graphql-playground-middleware-express - TypeError: expressPlayground is not a function #1327

@tatejones

Description

@tatejones

This issue pertains to the following package(s):

  • GraphQL Playground - Electron App
  • GraphQL Playground HTML
  • GraphQL Playground
  • [x ] GraphQL Playground Express Middleware
  • GraphQL Playground Hapi Middleware
  • GraphQL Playground Koa Middleware
  • GraphQL Playground Lambda Middleware

What OS and OS version are you experiencing the issue(s) on?

Mac OS X

Running node 15.23
with ts-node/esm

"node --experimental-repl-await --loader=ts-node/esm --experimental-specifier-resolution=node"

What version of graphql-playground(-electron/-middleware) are you experiencing the issue(s) on?

1.7.22

What is the expected behavior?

import expressPlayground from "graphql-playground-middleware-express";

Expecting expressPlayground to be a function.

What is the actual behavior?

TypeError: expressPlayground is not a function

What steps may we take to reproduce the behavior?

import expressPlayground from "graphql-playground-middleware-express";
....

const app = express();
app.get("/", expressPlayground({ endpoint: graphqlPath }));

....
tsc finds no issues with the index.d.ts of graphql-playground-middleware-express.
It seems to be an issue with the compiled js file.

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