Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace graphql-request with fetch (#15)
graphql-request is big package and depends on graphql. Practically it does not do anything here. Only send request and handle errors. https://packagephobia.com/result?p=graphql-request (756kB) https://packagephobia.com/result?p=graphql (1.28MB) Here I replaced it with fetch from undici. Happily codegen have an option to generate generic sdk with own requester function. In the future undici may even be replaced with builtin into node version.
- Loading branch information
Showing
6 changed files
with
53 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,4 @@ generates: | |
plugins: | ||
- typescript | ||
- typescript-operations | ||
- typescript-graphql-request | ||
- typescript-generic-sdk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export { getSdk } from "../__generated__"; | ||
export type { Requester } from "../__generated__"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters