Replies: 1 comment 1 reply
-
Hey @VojtaSim, Here's an example of GraphQL codegen with import { CodegenConfig } from "@graphql-codegen/cli";
import swellConfig from "./swell.config";
const config: CodegenConfig = {
schema: {
[swellConfig.url]: {
headers: {
Authorization: swellConfig.token,
},
},
},
documents: ["src/**/*.gql"],
generates: {
"./src/__generated__/sdk.ts": {
plugins: [
"typescript",
"typescript-operations",
"typescript-graphql-request",
],
config: {
rawRequest: true,
},
},
},
};
export default config; |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I haven't seen this concern raised anywhere so I feel like it needs to mentioned.
Working with the swell-js library in a TS project makes me cry...
attributes
on Product)?
because of this.swell-node could also use some typedefs... I've spent hours creating types according to docs just to be able to work with it.
Please do something about that 🙏
Beta Was this translation helpful? Give feedback.
All reactions