New issue
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add support for get request #277
feat: add support for get request #277
Conversation
@@ -1,7 +1,7 @@ | |||
import crossFetch, * as CrossFetch from 'cross-fetch' | |||
import { print } from 'graphql/language/printer' | |||
import createRequestBody from './createRequestBody' | |||
import { ClientError, GraphQLError, RequestDocument, Variables } from './types' | |||
import { ClientError, RequestDocument, Variables } from './types' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed GraphQLError
as it is not in use
* Fetch data using POST method | ||
*/ | ||
const post = async <V = Variables>( | ||
url: string, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I followed the way you declare functions to keep consistency but I'm not a huge fan of using too much args here and I spend much time to think if I should use a typed object here. Tell me if it is okay for you or if you want me to change this
Before back and forth/review is done and the PR merged/closed, I published a working version of my fork on NPM you may find here : https://www.npmjs.com/package/@vahill/graphql-request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
馃枛馃徎 Hello Prisma team,
Here is a proposal to provide support for GET requests.
Should resolve #61 and #260