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

Connect to another graphql server #2165

Closed
fitfab opened this issue Sep 19, 2017 · 7 comments
Closed

Connect to another graphql server #2165

fitfab opened this issue Sep 19, 2017 · 7 comments

Comments

@fitfab
Copy link

fitfab commented Sep 19, 2017

so I want to point to another graphql server, where should I do that? in the webpack configuration?

@craigmulligan
Copy link

craigmulligan commented Sep 19, 2017

Interesting, I've also been thinking about this a little. If gatsby's data generator was it's own module we could use gatsby plugins in non-gatsby apps too.

For instance if it had the following api:

cont { schema } = await require('gatsby-data')(gatsbyConfig)

Then we could load that schema and run it with other apps, it'd also have the side effect of have the schema generation self contained and easy to run gatsby without graphql for instance:

gatsby develop --no-data

@dbrookes
Copy link
Contributor

Is there a way to do this without building a gatsby-source plugin for the external graphql server?

@KyleAMathews
Copy link
Contributor

Not yet. There's a proposal for mirroring external GraphQL servers but the work needs done still.

@johanneslamers
Copy link

@KyleAMathews any updates on this proposal?

@javdl
Copy link

javdl commented Jan 15, 2018

I tried this with GraphCMS source plugin, that works fine! I think that could be used as a base for a more generic GraphQL-source plugin. By the way I must say you get a pretty nice workflow mocking up your API with GraphCMS and using Gatsby to build a frontend. Using Markdown for that is still faster though ;)

@gaui
Copy link

gaui commented Jun 26, 2018

Any update on this with v2? We have an external GraphQL server that we wish to use. Is the only way to write a source plugin?

@KyleAMathews
Copy link
Contributor

Closing this issue as it's fairly old and we have far too many open issues! If you have additional problems in this area, please open a new issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants