-
-
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
deprecated onTypeConflict substitution? #863
Comments
+1 |
@joeflack4 I'm current working on removing this and providing a good alternative; it looks like in the example you provided, onTypeConflict is not really used; only to select the first type that shows up. @terion-name would it work for you if merging types was the only option and always done? And then if you wanted to remove or rename fields you do that with a transform? |
@stubailo merging types how? Let's assume I have two conflicting types: |
@stubailo: what I'm looking for is this "left-first" solution. Is the correct answer to just reverse the array (i.e. order matters, similar to Object.assign)? |
Did anyone figure out how to replace We are simply just checking if you have a conflicting type, and then throwing an error, which'll be caught in our integration-test flow. |
I have the same use-case as @Tehnix and I am trying to figure out how to do that with transformations. In my case, the names of root fields in the schemas are not known in advance, so it's probably impossible to implement with transformations. |
Apparently the option's use got completely removed by @stubailo here :-( I'm not seeing much use of argument based on this search and |
I have the same use case as @Tehnix and just put together a tool to also check for field collisions on object types before merging. Would it maybe make sense putting this with the stitching tools? Otherwise I'll just release it as npm module on its own. |
@kommander Did you end up publishing it as a package? |
@thehappycoder nope, it ended up as part of the project codebase 😦 |
onTypeConflict is back in graphql-tools-fork https://www.npmjs.com/package/graphql-tools-fork |
Folded into #1306 |
well, ok. but how to mimic onTypeConflict with transforms? I need literally merge duplicating types and handle this merging process. How to do this via transforms?
The text was updated successfully, but these errors were encountered: