Added association tracking
This commit is contained in:
27
client/src/graphql/associations.queries.js
Normal file
27
client/src/graphql/associations.queries.js
Normal 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
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
Reference in New Issue
Block a user