-
Notifications
You must be signed in to change notification settings - Fork 161
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
flow-operations tries to spread inexact objects #198
Comments
I am having the same issue. Did you manage to get a solution to this? |
Sorry I didn't see your reply. I ended up making a custom codegen plugin, copy pasting source code from the flow-operations node module and adjusting the line I mentioned in this issue. |
Could you make a PR so they could integrate the solution? |
|
Edit: I found the line causing this issue. I would suggest making it check the config for whether or not
flowExactObject
is specified and then making it an exact typename object.I can make a PR if devs agree with this change.
Describe the bug
flow-operations makes its own $Pick util function and then tries to spread the results of it into a merged object which also includes inexact types.
Please try removing the question mark on line 9 from the FlowTry, or try making
{__typename: "Reference"}
exact like{|__typename: "Reference"|}
:My codebase produces this problem in large quantities.
Your Example Website or App
https://flow.org/try/#0FAFwngDgpgBAJABQJYGMDWAeA8gJyQcyQDsAuGLAIwCsoUQAaGAaSjAGczKa6A+GAXnhcAsgEMISDC3aMprHgAo0ZaQEoBfOAFEANlAC2UIiAAqkKNjyEijaTx4BuYKHMwcUAGZR3RFLEEA3gA+ogD8ZBQA9pF6okRBAL7O4NAwHjqRAO5Y0DiiIEiRRGxmqYHAMDAAdDUBMAD69SlGooZkAOQASp7eRn7tMAn0FdU1iKiY7l4+fowjwTBhZABUMIk8wEnAKEVsIDAgUHtk6Vk53vmFxaX+MAGNzUStUGQARN3TfVCvjKJkIDgAK5QBJAA
Steps to Reproduce the Bug or Issue
Generate types from an exact object with an optional property type.
Expected behavior
The typename object should be exact.
Screenshots or Videos
No response
Platform
@graphql-codegen/flow-operations
version: ^2.2.13Codegen Config File
Additional context
No response
The text was updated successfully, but these errors were encountered: