Actions
development #23
closedmodel Note
Start date:
06/06/2023
Due date:
% Done:
0%
Estimated time:
Updated by Ariel Biton about 2 years ago
- Status changed from open to in progress
- GraphQL queries GET_NOTE and GET_NOTES ready in back and front
- GraphQL mutation CREATE_NOTE and DELETE_NOTE ready in back and front
- schema
const typeDefs = gql`
"Note object"
type Note {
id: ID!
title: String!
content: String
}
"User object"
type User {
id: ID!
email: String!
firstName: String
lastName: String
userName: String
notes: [Note]
}
type Query {
"retrieve all notes"
notes: [Note]
"retrieve a note"
note(id: ID!): Note
}
type Mutation {
"create a new note"
createNote(title: String!, content: String): Note
"delete note"
deleteNote(id: ID!): Note
}
`;
Actions