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

Add #import support #16

Closed
vincentwinkel opened this issue Oct 7, 2022 · 1 comment
Closed

Add #import support #16

vincentwinkel opened this issue Oct 7, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@vincentwinkel
Copy link

It could be awesome to add the supportt of #import, really useful for the fragments.
Example:

# File user.fragment.gql

fragment UserFragment on User {
  id
  email
}
# File query.user.gql

#import "./user.fragment.gql"
query user {
  user {
    ...UserFragment
  }
}

and then we just need to loadFile('query.user.gql');.

@tiago154
Copy link
Owner

Hi @vincentwinkel , thanks for the suggestion.

I implemented #import annotation support for the loadFile function.

Feel free to validate the operation by installing the version graphql-import-files@1.2.18

@tiago154 tiago154 added the enhancement New feature or request label Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants