Added ability to change auth level IO-550

This commit is contained in:
Patrick Fic
2021-01-07 16:34:09 -08:00
parent 0c83a62dd2
commit 288bdf89a4
15 changed files with 417 additions and 4 deletions

View File

@@ -1,5 +1,36 @@
import gql from "graphql-tag";
export const QUERY_SHOP_ASSOCIATIONS = gql`
query QUERY_SHOP_ASSOCIATIONS {
associations {
id
authlevel
shopid
user {
email
}
}
}
`;
export const UPDATE_ASSOCIATION = gql`
mutation UPDATE_ASSOCIATION(
$assocId: uuid!
$assoc: associations_set_input!
) {
update_associations(where: { id: { _eq: $assocId } }, _set: $assoc) {
returning {
id
authlevel
shopid
user {
email
}
}
}
}
`;
export const UPSERT_USER = gql`
mutation UPSERT_USER($authEmail: String!, $authToken: String!) {
insert_users(