-
-
Notifications
You must be signed in to change notification settings - Fork 796
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
WrapType for mutations #1708
Comments
Does it not work? I think I wouldn't recommend it because of confusion to me about how exactly the contract of serial execution for mutation fields work. But other than that, I don't think there are technical issues, Subscriptions would have technical issues, as async iterators returned for root subscription fields, not for subfields, but mutations should work, just perhaps with some technical gotchas. Could you open a PR with a failing test? |
Thanks for the swift response. I read in a couple of places that it wouldn't work but good to hear that there might not actually be a technical reason for it to not work. I was encountering issues but our stack has so much going on that it's very difficult to isolate the precise issue. I'll try and put together something simple soon to test it out and will raise a PR if it fails. Thanks again! |
I've raised a PR with a failing test. Let me know if I've done anything particularly stupid, or if there's anything I can do to help. |
Looks like I did something stupid, now reverted by #1723. The latest changes of this PR are available as alpha in npm: Quickly update your package.json by running:
|
Everything is working great now, thanks for all the help! |
Not directly relevant but seems easier to cover this in the same thread, especially since it seems WrapType related. I'm encountering an issue where 2 resolvers have the same name but return data of types with different names, despite the resolvers being in different schemas and being WrapType'd into different namespaces. The error is: I'm happy to create a failing test again but thought I'd check first that this should be expected to work. Below is some very basic code to recreate the issue:
|
Hello,
We currently use graphql-weaver in our projects to merge together multiple GraphQL schemas into a single schema but are looking to migrate away, primarily as graphql-weaver only supports GraphQL 14.
It seemed like WrapType could be able to easily replace the functionality we were getting from graphql-weaver and it seems to do just that for queries but I also noticed that WrapType doesn't work for mutations.
Is there a technical reason why WrapType can't support mutations? Does anyone have any recommendations for how to achieve an equivalent to what we were previously getting from graphql-weaver? I'm currently stuck in a situation where I'll need to change the structure of our schema as it doesn't seem like the same schema can be achieved with GraphQL 15.
Thanks in advance.
The text was updated successfully, but these errors were encountered: