Skip to content

Unify syntax between queries and mutation #10

@eric-burel

Description

@eric-burel

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions