Skip to content

Instantly share code, notes, and snippets.

@dgtlmonk
Created December 4, 2020 06:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dgtlmonk/1f2168c42194a95a31dff574f8bd4236 to your computer and use it in GitHub Desktop.
Save dgtlmonk/1f2168c42194a95a31dff574f8bd4236 to your computer and use it in GitHub Desktop.
function getBookingById(
ownerId: number,
bookingId: number,
fields: string[],
) {
return gql`
query getBookingById {
bookingsByOwnerIds(ownerIds: [${ownerId}], where: { id: ${bookingId} }) {
nodes {
${fields.join('\n')}
}
}
}
`;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment