Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Add a way to set the Apollo wrapper's displayName #354

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

Add a way to set the Apollo wrapper's displayName #354

SachaG opened this issue Dec 5, 2016 · 0 comments

Comments

@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
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