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

Idea: Global fragment map #512

Closed
nevir opened this issue Aug 7, 2016 · 2 comments
Closed

Idea: Global fragment map #512

nevir opened this issue Aug 7, 2016 · 2 comments

Comments

@nevir
Copy link
Contributor

nevir commented Aug 7, 2016

In our app, we have a fair number of commonly used fragments (especially for queries triggered via non-UI code). It'd be pretty handy to register fragments globally with an apollo-client instance to cut down on verbosity when querying

Maybe as a fragments argument when constructing the client?

@Poincare
Copy link
Contributor

Poincare commented Aug 8, 2016

We thought about this when designing the createFragment concept. At the time, we came to the conclusion that handling global state like this might actually be somewhat complicated to reason about and we went with a more local approach.

However, from the discussion in #480, it is evident that we will end up implementing this in some capacity since we want to be able to reference fragments by names only rather than by the references returned by createFragment.

@Poincare
Copy link
Contributor

Poincare commented Aug 9, 2016

I'll go ahead and close this since this suggestion is pretty much a part of #480. We can re-open if this is not the case.

@Poincare Poincare closed this as completed Aug 9, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants