How can I change a feathParam during runtime #8348
Answered
by
charlypoly
rickwillcox
asked this question in
Q&A
-
I want to send a firebase Auth token when I have but I cant figure out how to attach it to the request overwrite: true
schema: 'http://localhost:8000/graphql'
documents: 'src/services/graphQL/**/*.graphql'
generates:
src/services/graphQL/graphql.ts:
plugins:
- 'typescript'
- 'typescript-operations'
- 'typescript-react-query'
config:
fetcher:
endpoint: 'http://localhost:8000/graphql'
fetchParams:
headers:
content-type: 'application/json'
Authorization : "THIS_WORKS"
./graphql.schema.json:
plugins:
- 'introspection' And an example query we are sending using react query. const { data, error, isLoading, isSuccess } =
useSearchCompanyNamesAutoCompleteQuery({
input: { searchWebsiteURL: 'gmail' },
}); I basically need a way to population the "THIS_WORKS" part with a varaible at run time. |
Beta Was this translation helpful? Give feedback.
Answered by
charlypoly
Sep 20, 2022
Replies: 1 comment
-
Hi @rickwillcox, Providing headers at runtime (when calling a generated React Query hook) is currently not supported. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
charlypoly
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @rickwillcox,
Providing headers at runtime (when calling a generated React Query hook) is currently not supported.
Feel free to open an issue for this feature request or provide a PR 👀