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
When I use Chain to send a request with a header. TheContent-Type is changes by GraphQL Zeus to a "utf-8"
Chain
Content-Type
This is with no header:
import { Chain, GraphQLTypes, InputType } from "../../zeus"; export const CreateSession = async (data: GraphQLTypes['SessionCreateInput'], token: string) => { try { const createSessionData = await Chain((process.env.REACT_APP_GRAPHQL as string), { // headers: { // Authorization: token, // }, })('mutation')({ createSession: [ { data }, { id: true } ] }); if (createSessionData.createSession) { return true } return undefined } catch (error) { return undefined } };
Now if I uncomment and add the header the Content-Type changes:
import { Chain, GraphQLTypes, InputType } from "../../zeus"; export const CreateSession = async (data: GraphQLTypes['SessionCreateInput'], token: string) => { try { const createSessionData = await Chain((process.env.REACT_APP_GRAPHQL as string), { headers: { Authorization: token, }, })('mutation')({ createSession: [ { data }, { id: true } ] }); if (createSessionData.createSession) { return true } return undefined } catch (error) { return undefined } };
I have also tried adding the Content=Type as a proper header but this keeps it as text/plain
import { Chain, GraphQLTypes, InputType } from "../../zeus"; export const CreateSession = async (data: GraphQLTypes['SessionCreateInput'], token: string) => { try { const createSessionData = await Chain((process.env.REACT_APP_GRAPHQL as string), { headers: { Authorization: token, "Content-Type": "application/json" }, })('mutation')({ createSession: [ { data }, { id: true } ] }); if (createSessionData.createSession) { return true } return undefined } catch (error) { return undefined } };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When I use
Chain
to send a request with a header. TheContent-Type
is changes by GraphQL Zeus to a "utf-8"This is with no header:
Now if I uncomment and add the header the Content-Type changes:
I have also tried adding the Content=Type as a proper header but this keeps it as text/plain
The text was updated successfully, but these errors were encountered: