add contact page
This commit is contained in:
29
api/src/graphql/contacts.sdl.js
Normal file
29
api/src/graphql/contacts.sdl.js
Normal file
@@ -0,0 +1,29 @@
|
||||
export const schema = gql`
|
||||
type Contact {
|
||||
id: Int!
|
||||
name: String!
|
||||
email: String!
|
||||
message: String!
|
||||
createdAt: DateTime!
|
||||
}
|
||||
|
||||
type Query {
|
||||
contacts: [Contact!]!
|
||||
}
|
||||
|
||||
input CreateContactInput {
|
||||
name: String!
|
||||
email: String!
|
||||
message: String!
|
||||
}
|
||||
|
||||
input UpdateContactInput {
|
||||
name: String
|
||||
email: String
|
||||
message: String
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
createContact(input: CreateContactInput!): Contact
|
||||
}
|
||||
`
|
||||
Reference in New Issue
Block a user