-
-
Notifications
You must be signed in to change notification settings - Fork 816
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
Upgrade graphql peerDependency to 14.0.0 #945
Comments
Just a note from Please free to ping me if you need any help with migration. |
Hi @IvanGoncharov - thanks for your offer to help. I'm working on updating I see that in In (and here’s the PR where we introduced these changes: #508) Now that Well, technically we can - replacing with const enumField = type.getValue(fieldName);
const originalEnumValue = enumField.value;
const newEnumValue = resolverValue[fieldName];
if (hasOwn.call(type, '_valueLookup')) {
(type as any)._valueLookup.delete(originalEnumValue);
(type as any)._valueLookup.set(newEnumValue, enumField);
}
enumField.value = newEnumValue; fixes our problems, but as you can see that means we have to tie into non-public aspects of the I'd love to get your thoughts/comments on this @IvanGoncharov . I doubt you'll want to open things up to expose Thanks for your time! |
@hwillson Problem is that we can't treat But I think core problem here is why you are forced to mutate these object in the first place. My long-term plan is to allow supplying enum values, resolvers, etc. to Meanwhile, the best possible solution would be to treat enum value assignment and all other mutation of AFAIK, you already have this code here: https://github.com/apollographql/graphql-tools/blob/master/src/stitching/schemaRecreation.ts Note: We aware of how complex it's to implement schema transformation ATM so we also working on making it more easy to do this, for example: And after stabilizing ecosystem after |
@hwillson Please pin it to |
@hwillson We are always publishing RC before any major change so I can notify your or someone else from Apollo team next time when we will publish a new one. So you would have time to test it and give a feedback before public release. Are you interested and what the best way to do this? |
Thanks very much for the detailed response @IvanGoncharov! This all makes complete sense. I started heading down the create a new Regarding #945 (comment), that would be awesome! Opening an issue in this repo is probably the best bet, but I'm also subscribed to Thanks again for your help @IvanGoncharov! |
@hwillson Feel free to ping me if you will face any other issues with porting to a new version of |
BTW. After every commit we publish the current snapshot of the |
The graphql package is released in major version at 14.0.0 and it would be nice if it could be supported as peerDependency.
The text was updated successfully, but these errors were encountered: