Skip to content

Commit

Permalink
feat(#303): Update contact and user gql schemas for frontend application
Browse files Browse the repository at this point in the history
  • Loading branch information
tholulomo committed Jun 13, 2023
1 parent e2751ae commit d1f8091
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
42 changes: 42 additions & 0 deletions app/src/modules/gql/contact-gql.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,45 @@ export const CONTACT_US_QUERY = gql`
}
}
`

export const CONTACT_INQUIRY_QUERY = gql`
query Query($input: contactsQueryInput) {
contacts(input: $input) {
totalItems
pageSize
pageNumber
totalPages
hasPreviousPage
hasNextPage
data {
_id
fullName
email
purpose
message
resolved
response
createdAt
updatedAt
resolvedBy
}
}
}
`

export const CONTACT_UPDATE_QUERY = gql`
mutation Mutation($input: updateContactInput!) {
updateContact(input: $input) {
_id
fullName
email
purpose
message
resolved
response
createdAt
updatedAt
resolvedBy
}
}
`
28 changes: 28 additions & 0 deletions app/src/modules/gql/user-gql.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import gql from 'graphql-tag'

export const USERS_QUERY = gql`
query User($input: usersQueryInput) {
users(input: $input) {
totalItems
pageSize
pageNumber
totalPages
hasPreviousPage
hasNextPage
data {
_id
alias
givenName
surName
displayName
email
apiAccess
}
}
}
`
export const DELETE_USERS_QUERY = gql`
mutation DeleteUser($input: deleteUsersInput) {
deleteUser(input: $input)
}
`

0 comments on commit d1f8091

Please sign in to comment.