-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
feat: add Relay ID translation in mutation and queries #109
Conversation
@zachdaniel the feature is working, but it's missing some error handling and some more niceties. Opening as draft to collect feedback on the direction/naming/etc. |
46c2627
to
b4e8bcc
Compare
I'm wondering if there is a way for us to figure this out automatically for cases with |
I think this would be orthogonal to The high level idea I have in mind to see if this can be automatically generated is more or less this:
Given we would still need the manual way to do this to provide an escape hatch for cases not covered by the autogeneration, I don't know if you prefer fixing the manual way and then working on the autogeneration in a separate PR or start directly with the autogeneration. |
Yes, great points. We need both 👍 Doesn't really matter which one we start with 😄 |
As for managed relationship type generation, you should be able to tap into our existing logic for generating types for managed relationships |
9197459
to
d676af3
Compare
@zachdaniel ready for review, this implements the manual part as discussed above. I will then open an issue to track the implementation of the automatically derived translations. |
d676af3
to
7166d3e
Compare
Adds a new option for queries and mutations that defines which arguments or attributes will use a global Relay ID and their type. This allows automatically decoding them before hitting their action. This paves the way to automatic translation derived from the arguments, which will be implemented subsequently.
7166d3e
to
8590cc2
Compare
@zachdaniel rebased to fix the conflicts in the cheatsheet. I've also shortened the docs in the DSL and linked to the Relay guide instead as suggested by the Spark warning. |
🚀 Thank you for your contribution! 🚀 |
Bring in the global ID translations merged in ash-project/ash_graphql#109
Bring in the global ID translations merged in ash-project/ash_graphql#109 Signed-off-by: Riccardo Binetti <[email protected]>
Adds a new option for queries and mutations that defines which arguments or attributes will use a global Relay ID and their type. This allows automatically decoding them before hitting their action.
Contributor checklist