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

Support for shared fragments #1890

Closed
wants to merge 1 commit into from

Conversation

robp94
Copy link
Contributor

@robp94 robp94 commented Nov 22, 2023

📝 Description

Support a shared fragments file to avoid duplicate file generation.

🔗 Related Issues

#1245

@robp94 robp94 force-pushed the feature/shared-fragments branch from 92a01de to eaa624d Compare November 22, 2023 19:09
@dariuszkuc
Copy link
Collaborator

Since each GraphQL file can contain fragments (which may or may not overlap), I believe the solution should be accounting for this. Otherwise this would force clients to potentially rewrite all their queries.

Efficiently generating client code is a pretty complex topic and there are number of considerations and tradeoffs with the approaches. Martin Bonnin did a great write up on this topic in how they approach this problem in apollo-kotlin (see link).

@robp94
Copy link
Contributor Author

robp94 commented Nov 27, 2023

While thinking about a possible approach for this, I came a round some problems, so yeah it can get really complex. That is why I came up with this more manual approach.

To find a better approach maybe we could start with listing some key requirements in the issue if possible?

@robp94 robp94 closed this Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants