Note insert.
This commit is contained in:
22
graphql/notes.queries.js
Normal file
22
graphql/notes.queries.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import { gql } from "graphql-tag";
|
||||
|
||||
// TODO: Confirm backend schema for notes table. Assumed fields:
|
||||
// id (uuid), jobid (uuid), text (String!), critical (Boolean), private (Boolean), pinned (Boolean), type (String), created_at (timestamptz), created_by (String)
|
||||
// relatedros is assumed handled via separate linking if required.
|
||||
|
||||
export const INSERT_NEW_NOTE = gql`
|
||||
mutation INSERT_NEW_NOTE($note: [notes_insert_input!]!) {
|
||||
insert_notes(objects: $note) {
|
||||
returning {
|
||||
id
|
||||
text
|
||||
critical
|
||||
private
|
||||
pinned
|
||||
type
|
||||
created_at
|
||||
created_by
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
Reference in New Issue
Block a user