Closed frankarnaud closed 1 year ago
Hello,
Thanks for raising this issue. I was able to consistently reproduce this issue following the reproduction steps provided
Payload:
Response:
I was able to successfully create App sync article that persisted to DynamoDB with same Cognito user. Marking this as a bug for team to investigate further.
Hi @frankarnaud 👋 could you try following this documentation to allow your IAM user to access the GraphQL API in the AppSync console? https://docs.amplify.aws/cli/graphql/authorization-rules/#use-iam-authorization-within-the-appsync-console
Also, please try changing the auth mode in the console to Cognito User Pools and try querying again.
Hi @frankarnaud 👋 could you try following this documentation to allow your IAM user to access the GraphQL API in the AppSync console? https://docs.amplify.aws/cli/graphql/authorization-rules/#use-iam-authorization-within-the-appsync-console
Also, please try changing the auth mode in the console to Cognito User Pools and try querying again.
Hi @chrisbonifacio, thank you for paying attention to my concern. However, I don't have a permission problem. I will apply the procedure to see if it solves the problem even if I am not too hopeful. regards.
@frankarnaud yeah, you're correct. After digging into this further last week, you would've received an unauthorized error response from AppSync if your IAM role/user didn't have access in the console.
So the issue I'm having with my reproduction is that I am getting back the expected results from a filter both in DynamoDB and in the AppSync console, unlike the description of this issue.
DynamoDB Scan and Filter
AppSync Console Query (IAM)
Can you share the cli.json
file in your amplify folder as well as the request and response resolvers for listArticles
in your amplify/api/build/resolvers
folder?
Can you share the
cli.json
file in your amplify folder as well as the request and response resolvers forlistArticles
in youramplify/api/build/resolvers
folder?
Hi, I can't find the resolvers in the mentioned path as shown with the capture
Looks like you're on an older version of the amplify CLI. Would you be able to upgrade to the latest version, make a small change to the schema, and then run amplify build
? You can also run amplify push
if it compiles successfully.
I created my api using the latest CLI version and wasn't able to reproduce the issue on the latest version.
After redeploying the backend, attempt the query again and let me know if the result of the query is any different.
Hello, sorry the program has been very busy these last few days. I will try to do what you say. Some concerns however because we use datastore on our front-end and had already had problems when the schema is changed
@frankarnaud no worries! The change to the schema could be as simple as a comment and the Amplify CLI will recognize it as having been updated so you can run amplify push
again to rebuild and deploy the backend with the latest cli version.
Hi, here is what you are probably asking
,
Seems to longer be an issue in the latest CLI. Please comment if you are still experiencing the issue.
Before opening, please confirm:
JavaScript Framework
Not applicable
Amplify APIs
GraphQL API
Amplify Categories
api
Environment information
Describe the bug
When we use the appsync service from the interface provided by AWS to make graphql queries of the data available in our aws dynamoDB database, the responses to these queries are inconsistent (mostly return nothing). However, these exist in our database. We use our mobile app made with react-native and amplify datastore for operations.
Expected behavior
We expect correct responses from requests made with appsync with the data available in dynamoDB.
Reproduction steps
data for some reason is not available.
Code Snippet
This is a query from dynamo console.
This is same query but in appsync console.
You can notice the responses are different.
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response