-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
Description
Current state:
- single will return
{ data: { foo : { result: <your-foo>}, result: }}` - multi will return
{ data: { foo : { results: <your-foo>}, results: }}` - create will return
{ data: { foo : { data: <your-foo>}, document: }}` - same for all other mutations
Proposal
- single will return
{ data: { foo : { document: <your-foo>}, document: }}` - multi will return
{ data: { foo : { documents: <your-foo>}, documents: }}` - create will return
{ data: { foo : { document: <your-foo>}, document: }}` - same for all other mutations
This way we use document as the canonical name for the object we are modifying ; we remove the confusing result name, and we use data only for generic data (eg the response of apollo query that contains both documents and metadata)
Steps
- Unify the shortcut prop that contains the document (added client-side by the hook)
- Unify in Vulcan backend (defined server side in each resolver)