We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
export function HttpClientProvider({ baseURL, token, scopeRecord, children }: HttpClientProviderProps) { const authLink = new ApolloLink((operation, forward) => { operation.setContext(({ headers = {} }) => ({ headers: { ...headers, [CSRF_TOKEN]: token, }, })); return forward(operation); }); const setScopeLink = setContext((request, previousContext) => { console.log('sc',scopeRecord); return { ...previousContext, scopeRecord }; }); const restLink = new RestLink({ uri: baseURL, }); const client = new ApolloClient({ cache: new InMemoryCache(), link: ApolloLink.from([authLink, setScopeLink, restLink]), }); return <ApolloProvider client={client}>{children}</ApolloProvider>; }
export const ABC= gql` query listPolicies($limit: Int, $skip: Int, $sortedColumn: SortedColumn, $filter: PolicyFilter) { listPolicies(limit: $limit, skip: $skip, sortedColumn: $sortedColumn, filter: $filter) @rest(type: "TYPEA", path: "${SERVICE_BASE_PATH}?{args}&{context.scopeRecord}", method: "GET") { data } } `;
context.scopeRecord is coming undefined although in the console.log(scopeRecord) I see the value
context.scopeRecord
The text was updated successfully, but these errors were encountered:
No branches or pull requests
context.scopeRecord
is coming undefined although in the console.log(scopeRecord) I see the valueThe text was updated successfully, but these errors were encountered: