Skip to content

How to define complex update input #2507

Answered by alveshelio
alveshelio asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @jlalmes ,

Thank you for getting back. I'm looking for updates that have relationships. In my example, I have an invoice that has sections that has items. I'm wondering if I need to fully define what kind of object that I'm expecting. This could become quite complex based on the type of relationships you can get.

In GraphQL I can create a function that would build the variables to the needed input. I could simply type the function return with the appropriate type and the function would take care of building the input accordingly to the needed output.

What are the best practices for complex update inputs? Are we supposed to define the input exactly as the type it's expecting?

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
1 reply
@jlalmes
Comment options

Comment options

You must be logged in to vote
6 replies
@alveshelio
Comment options

@KATT
Comment options

@alveshelio
Comment options

@jlalmes
Comment options

@u007
Comment options

Answer selected by KATT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants