Added association tracking

This commit is contained in:
Patrick Fic
2020-02-04 16:56:34 -08:00
parent de6ca52fb8
commit 02578bda2a
11 changed files with 282 additions and 10 deletions

View File

@@ -0,0 +1,27 @@
import { gql } from "apollo-boost";
export const QUERY_ALL_ASSOCIATIONS = gql`
query QUERY_ALL_ASSOCIATIONS {
associations {
id
active
bodyshop {
shopname
}
}
}
`;
export const UPDATE_ASSOCIATION = gql`
mutation UPDATE_ASSOCIATION($assocId: uuid, $assocActive: Boolean) {
update_associations(
where: { id: { _eq: $assocId } }
_set: { active: $assocActive }
) {
returning {
id
active
}
}
}
`;