@rainer9202 You will need to import the Apollo Client into your js file.
I created my own Apollo Client boot file and I am using Vuex. Vuex is just a JavaScript file. Not an exact match to what you are doing but should be close enough to get you started. Hope this helps.
Here is how I import the Apollo Client into a Vuex js file.
import gql from 'graphql-tag'
import { apolloProvider } from 'boot/apolloClient'
import { Notify } from 'quasar'
const gqlClient = apolloProvider.defaultClient
This is an example of a query with parameters.
const response = await gqlClient.query({
query: gql`
query AllScheduledRecordings(
$orderBy: [OrderByFields]
$filterBy: [FilterByFields]
$between: [BetweenFields]
$whereIn: [WhereInField]
$page: Page
) {
allScheduledRecordings(
orderBy: $orderBy
filterBy: $filterBy
between: $between
whereIn: $whereIn
page: $page
) {
oid
name
channelOid
recurrenceOid
channelName
filename
status
startTimeLocal
endTimeLocal
failureReason
eventDetails
landscapeUrl
posterUrl
logoUrl
videoFiles {
name
base
dir
ext
baseURL
}
}
}
`,
variables: {
...payload
}
})