Skip to content

[Step1|BE] Add new snippet file input type to GraphQL

When we allow multiple files in snippets, we need to pass an array of files to both the creation and update mutations in GraphQL. For that matter, we need to create a new type that we can include in those mutations. We can call it FileInputType and stored inside the snippets directory in GraphQL. An example of this kind of class would be DiffImagePositionInputType

That new type will have the following string fields:

  • action (the possible actions are create, update, move, and delete)
  • previous_path
  • file_path (can't be blank)
  • content
Edited by Francisco Javier López