Closed totuslink closed 2 years ago
Is this issue solvable? Does amplify support this feature?
Hi @totuslink
Can you try the same query on Appsync console?
Hi @akshbhu , Thank for your response!!
After login with my cognito admin account and enter every information at appsync console then press play, the loading spinner keep spinning. 2 min after the spinner disappear and console display Network error which is just like operating at client side.
Hi, Amplify ~
I still lost in this problem which is very hard to solve, if there is any error log I believe I can solve it by myself. But there isn't any error log on my cloudwatch.
Can anyone help us light up a path.
@akshbhu Sorry for bothering, but do you have other method to BatchPutItem into multiple tables?
Any help will be appreciated.
Hi @totuslink
Are you still stuck on this issue?
Is this still pending? can we perform batchputItem?9727 is what I am currently facing
@sarv-fuse I am the creator of Totuslink, Thanks for getting back, but I am afraid that I can't offer lots of details, the project had closed for a while.
@sarv-fuse I am the creator of Totuslink, Thanks for getting back, but I am afraid that I can't offer lots of details, the project had closed for a while.
Some clues I can offer are:
- The Batch put item is not working across multiple tables but it can work on a single table.
- The document needs to be updated, there are lots of misleading information.
@EiffelFly Thank you for your reply, I am trying to do BatchputItem for single table and currently i am facing
- "message": "Unsupported operation 'BatchPutItem'. Datasource Versioning only supports the following operations (TransactGetItems,PutItem,BatchGetItem,Scan,Query,GetItem,DeleteItem,UpdateItem,Sync)"
Will there be issue enabling versioning for API to do BatchPutItem?
@sarv-fuse
Maybe this SO article will help
Closing due to inactivity
Is Amplify planning to have a more user-friendly way to do batch operations on a model?
A user-friendly way would be something like this
import { writeBatch, doc } from "firebase/firestore";
// Get a new write batch
const batch = writeBatch(db);
// Set the value of 'NYC'
const nycRef = doc(db, "cities", "NYC");
batch.set(nycRef, {name: "New York City"});
// Update the population of 'SF'
const sfRef = doc(db, "cities", "SF");
batch.update(sfRef, {"population": 1000000});
// Commit the batch
await batch.commit();
Which Category is your question related to? Appsync
Amplify CLI Version 4.52.0
What AWS Services are you utilizing? Appsync DynamoDB
Provide additional details e.g. code snippets
I want to do BatchPutItem request to multiple tables, at first I follow this guide Creating GraphQL Batch Operations for AWS Amplify with AppSync and Cognito Then try to get everything working from there. Here is my step.
Config
1. Create a Appsync Datasource point to but grant special IAM policy which have access to multiple tables, here is the policy screenshot
2. Write custom mutation schema
3. Here is my custom resolver: Mutation.CreateNodeBuildingNecessaryItems.req.vtl
4. Here is Mutation.CreateNodeBuildingNecessaryItems.res.vtl
5. Create customeResource.json to let cloudFormation identify resource
6. Query appsync with mutation graphql string
Issue
How can I solve this kind of problem.
REF