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 a way to set the Apollo wrapper's displayName #354

Closed
SachaG opened this Issue Dec 5, 2016 · 0 comments

Comments

Projects
None yet
2 participants
@SachaG
Copy link

SachaG commented Dec 5, 2016

In my codebase, I have a scenario where I'm wrapping a form with three Apollo higher-order components: one to load the data shown in the form, one to add an edit mutation, and one to add a remove mutation.

This means that when using the React inspector, I end up with something that looks like:

<Apollo(Apollo(Apollo(withLoader(Form))))>

My suggestion would be to add an alias option to the graphql function's config argument so that you're able to get something like:

<withPost(withEdit(withRemove(withLoader(Form))))>

Here's where the change would take place:

https://github.com/SachaG/react-apollo/blob/master/src/graphql.tsx#L147

@SachaG SachaG changed the title Add a way to set the Apollo wrapper's name Add a way to set the Apollo wrapper's displayName Dec 5, 2016

@SachaG SachaG referenced this issue Jan 12, 2017

Merged

Add an `alias` option to `graphql` container #413

5 of 6 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment