Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

where is graphiqlKoa in v2 #1646

Closed
1 task done
sibelius opened this issue Sep 11, 2018 · 9 comments
Closed
1 task done

where is graphiqlKoa in v2 #1646

sibelius opened this issue Sep 11, 2018 · 9 comments

Comments

@sibelius
Copy link

  • feature

on v1, we could do something like this:

router.all(
  '/graphiql',
  graphiqlKoa({
    endpointURL: '/graphql',
    subscriptionsEndpoint: `ws://localhost:${process.env.GRAPHQL_PORT}/subscriptions`,
  }),
);

how can we do the same on v2?

@ghost ghost added the ⛲️ feature New addition or enhancement to existing solutions label Sep 11, 2018
@hugoserrana
Copy link

Hi @sibelius,
On mine, the GET on /graphql is returning Graphiql.
I don't know if this is the new design of Apollo-Server....

@hugoserrana
Copy link

@sibelius
Copy link
Author

could be related to this one DefinitelyTyped/DefinitelyTyped#28167

@Dknightsure
Copy link

Have a problem with V2
Error: has no exported member 'graphiqlKoa'

@ghost
Copy link

ghost commented Dec 27, 2018

Have a problem with V2
Error: has no exported member 'graphiqlKoa'

https://stackoverflow.com/questions/52402396/has-no-exported-member-graphqlkoa-and-have-tried-all-the-config-options

@ghost
Copy link

ghost commented Dec 27, 2018

I have the same problem

@JeffWong16
Copy link

You don't neet to use graphiqlKoa, just visit 'localhost:4000/graphql' .

@evenfrost
Copy link

evenfrost commented Feb 16, 2019

Mine returns 404. Any update on how GraphiQL can be used with Koa? Docs don't help either.

cc @evans @abernix @peggyrayzis @martijnwalraven

@abernix abernix removed the ⛲️ feature New addition or enhancement to existing solutions label Jul 4, 2019
@abernix
Copy link
Member

abernix commented Jul 5, 2019

Apollo Server 2.x ships with GraphQL Playground; we no longer ship GraphiQL with Apollo Server. As of Apollo Server 2.7.0 (currently in alpha via #2937), we now provide a getMiddleware method (#2435) on Koa and Express to expose the composed middleware that Apollo Server would otherwise apply via applyMiddleware. This should allow more refined customization when using Apollo Server with Koa. It still won't use GraphiQL though, so if that's of interest to you, I recommend setting playground: false and attaching your own GraphiQL Koa middleware (e.g. https://github.com/expo/koa-graphiql).

@abernix abernix closed this as completed Jul 5, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants