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

GraphQL support #102

Closed
ipauler opened this issue Mar 21, 2021 · 3 comments
Closed

GraphQL support #102

ipauler opened this issue Mar 21, 2021 · 3 comments

Comments

@ipauler
Copy link

ipauler commented Mar 21, 2021

Is there a way to include graphql files?
There's a esbuild-graphql plugin, but i'm not sure how to use it here

@floydspace
Copy link
Owner

floydspace commented Mar 22, 2021

Hi @ipauler you can use esbuild built-in text loader like this:

custom:
  esbuild:
    loader:
      .graphql: text

so it will bundle .graphql files

Update:
This will work only if you have a single .graphql file without imports

@floydspace
Copy link
Owner

We have an open issue #97 about plugin support, so it's kind of related. We need to make sure that https://github.com/luckycatfactory/esbuild-graphql-loader is usable with serverless-esbuild

@ipauler
Copy link
Author

ipauler commented Mar 23, 2021

Got it, thanks.
For now got it solved by using

package:
  individually: true  
  include:
    - src/**/graphql/schema.graphql

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

2 participants