-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
Eliminate graphql
dependency in production build
#376
Comments
@madebyfabian I would like to ask if this module is currently working properly? |
@awdr74100 Hi, yes for me, everything works, except of Fragments. But I am not using the nuxt-graphql-server module like you described in #369. |
@madebyfabian Thank you very much for your reply! I thought everyone could use the nuxt-graphql-server module except me... |
@madebyfabian fragments are working fine for me.. How are you setting them up? The docs are very vague on this.. You have to create a
Then add them into your
Hope this helps:) |
@rylanharper Thanks for the details! This should absolutely be in the docs, since it's not standard graphql-ish behaviour. Now it's working. Issue was: I named my fragment files If I find some time I'll create a docs PR. |
Your use case
Hi there! Thanks for this module.
I was inspecting my builds and I see that
graphql
gets bundled in there. I see that this module only uses theimport { parse } from 'graphql'
(https://github.com/search?q=repo%3ADiizzayy%2Fnuxt-graphql-client%20from%20%27graphql%27&type=code)In my understanding, this method should only be needed while building. Or does this module read the
.gql
files in runtime from the server?I see that it adds a good amount of KB's to my build:
![Bildschirmfoto 2023-09-11 um 08 21 51](https://private-user-images.githubusercontent.com/32813692/266925692-f52317f1-f0e2-4c23-8a90-88161ae5c488.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE5MDY3MjIsIm5iZiI6MTcyMTkwNjQyMiwicGF0aCI6Ii8zMjgxMzY5Mi8yNjY5MjU2OTItZjUyMzE3ZjEtZjBlMi00YzIzLThhOTAtODgxNjFhZTVjNDg4LmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzI1VDExMjAyMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTlkYmI0MzZjNDMzYjNhZGFmMTJkNzFhYjE1MGY2NGViODk4ZDc3NjcwMjlmMGRhMWE4MmYyNzI0ZjhjZjcyYTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.4J72YqV_NZzq569eheCT_BuAlWYEcwhpO3JARfiXIeY)
The solution you'd like
If it's possible, remove this dependency in production builds.
Possible alternatives
No response
Additional information
Similar issue: urql-graphql/urql#307
The text was updated successfully, but these errors were encountered: