Files
bodyshop/client/src/graphql/associations.queries.js

28 lines
489 B
JavaScript

import gql from "graphql-tag";
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
}
}
}
`;