storefrontapi.generated #1003
Replies: 2 comments 3 replies
-
|
You need to run Graphql Codegen for that. Basically, you can run it together with your dev server by passing the Edit: a solution for the warnings when mixing Storefront API and Admin API is shown in #1003 (reply in thread) |
Beta Was this translation helpful? Give feedback.
-
|
So I added additional graphql definitions, but they are failing to get generated because StagedUploadInput is unknown type, where and how would I be able to add those types since they are not used in the demo-store, and i want to be able to use them? const UPLOAD_CREATE = `#graphql
mutation stagedUploadsCreate($input: [StagedUploadInput!]!) {
stagedUploadsCreate(input: $input) {
stagedTargets {
resourceUrl
url
parameters {
name
value
}
}
userErrors {
field
message
}
}
}
`;
const FILE_CREATE = `#graphql
mutation fileCreate($files: [FileCreateInput!]!) {
fileCreate(files: $files) {
files {
fileStatus
alt
}
userErrors {
field
message
}
}
}
`;Here is the error: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
How do you regenerat "storefrontapi.generted.d.ts" when you make changes to the graphql queries?
Whenever i change the graphql fragment, it breaks the type in VSCODE, so i need to regenerate the file storefront.generated.d.ts
Beta Was this translation helpful? Give feedback.
All reactions