import { thunder } from '../config'; import { BookingsRessourceEnum, DurationTypeEnum } from '../helpers/graphql-zeus'; export const searchWorkspace = async () => { const searchWorkspace = await thunder.query({ workspacesSearchMany: [ { dateFrom: '2021-03-18T00:00:00', dateTo: '2021-03-20T00:00:00', hoursFrom: '10:00', hoursTo: '12:00', }, { _id: true, title: true, }, ], }); console.log(searchWorkspace); return searchWorkspace; }; export const getOneWorkspace = async () => { return await thunder.query({ workspacesGetOne: [ { id: '6187782d-0445-4c0d-8c31-6c0c48a95312', }, { _id: true, title: true, getOwner: { firstName: true, lastName: true, }, getBookings: [ {}, { dates: { startDate: true, endDate: true, }, }, ], }, ], }); };