Skip to content
This repository was archived by the owner on Sep 3, 2021. It is now read-only.
This repository was archived by the owner on Sep 3, 2021. It is now read-only.

Nested Input Mutations for GraphQL-compliant nested mutations #331

@FMenet

Description

@FMenet

I have seen requests of Nested mutations (#89) for neo4j-graphql-js.
But the thing is, GraphQL specification seems to suggest it is not a good idea, as subfields should just be query fields to see what data changed.The preferable way could be to add a nested input type.

example :

mutation ManageWithInputs{
ManageLibrary(addCollection:
{ collName:'aName',
addBook:
   {bookName:'coolBook',
    addBookAuthor:"Me"}
})
{bookName
bookAuthor}

instead of :

mutation manageALibrary  {
ManageLibrary{
AddCollection(collName:'aName'){
   AddBook(bookName:'aCoolBook'){
       AddBookAuthor(authName:"Me"){
bookName
bookAuthor
   }
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions