-
-
Notifications
You must be signed in to change notification settings - Fork 276
Open
Description
Hello, the stagedUploadsCreate mutation give an unkown error
RequestError: Variable $input of type [StagedUploadInput!]! was provided invalid value,
here the code:
let input = [];
for await (const [i, jsonlFileContent] of jsonlFileContentList.entries()) {
console.log("Creating staged file for batch:", i);
// Fill input for staged upload mutation
input.push(
{
resource: "BULK_MUTATION_VARIABLES",
filename: `bulk_op_vars_${i}.jsonl`,
mimeType: "text/jsonl",
httpMethod: "POST"
}
);
}
// Create temporary shopify file.
response = await shopify.graphql(
`#graphql
mutation stagedUploadsCreate($input: [StagedUploadInput!]!) {
stagedUploadsCreate(input: $input) {
stagedTargets {
url
resourceUrl
parameters {
name
value
}
}
userErrors {
field
message
}
}
}
`,
{
variables: {
input: input
}
}
);
await sleep(2000);
let responseJson = await response.json();
```
`
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels