The AWS Amplify CLI is a toolchain for simplifying serverless web and mobile development. This plugin provides functionality for the API category, allowing for the creation and management of GraphQL and REST based backends for your amplify project.
[X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
[X] I have removed any sensitive information from my code snippets and submission.
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v16.13.0
Amplify CLI Version
10.2.1
What operating system are you using?
M1 Mac w/ rosetta terminal
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
Manual changes required to add a mutation resolver that uses the BatchPutItem operation.
Amplify Categories
api
Amplify Commands
Not applicable
Describe the bug
I get the following error when I try and submit a "BatchPutItem" operation using the amplify mock api. I've tried a few different BatchPutItem operations and they all fail with this message.
Note, I don't get this error when I push my code up and use the hosted environment.
Expected behavior
I would expect the mock api to be able to handle BatchPutItem operations
Reproduction steps
Starting with a new directory:
> amplify init
> amplify add api to create graphql schema with > 1 table + auth
> amplify mock api to run mock api
update resolver for creating an item to use a BatchPutItem
attempt a BatchPutItem on the local mock api by calling the given mutation via the graphql explorer
GraphQL schema(s)
```graphql
# Put schemas below this line
type User @model @auth(rules: [{ allow: public, provider: iam }]) {
name: String
blog: Blog @hasOne
}
type Blog @model @auth(rules: [{ allow: public, provider: iam }]) {
id: ID!
name: String!
}
```
Hey @gxxcastillo, Thank you for reaching out. Amplify mock api currently does not support this workflow but is supported on the AppSync console.
Marking this as a feature request.
Before opening, please confirm:
How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
v16.13.0
Amplify CLI Version
10.2.1
What operating system are you using?
M1 Mac w/ rosetta terminal
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
Manual changes required to add a mutation resolver that uses the
BatchPutItem
operation.Amplify Categories
api
Amplify Commands
Not applicable
Describe the bug
I get the following error when I try and submit a "BatchPutItem" operation using the
amplify mock api
. I've tried a few differentBatchPutItem
operations and they all fail with this message.Note, I don't get this error when I push my code up and use the hosted environment.
Expected behavior
I would expect the mock api to be able to handle
BatchPutItem
operationsReproduction steps
Starting with a new directory:
> amplify init
> amplify add api
to create graphql schema with > 1 table + auth> amplify mock api
to run mock apiBatchPutItem
BatchPutItem
on the local mock api by calling the given mutation via the graphql explorerGraphQL schema(s)
Project Identifier
No response
Log output
Additional information
No response