Closed dperconti closed 3 years ago
Hi @dperconti 👋 Thanks for raising this issue. Can you share your graphQL schema as well so I can see how your auth rules are configured on the model?
Thanks for the fast reply, @chrisbonifacio. I've updated the original question to include a screenshot of the model that I created in the console, as well as the object schema.graphql
object for evidence by itself. The whole file is 250+ lines, so I only included the Evidence
object. If you'd like to see the whole thing let me know and I can certainly add it all.
I had an axios interceptor that was injecting the Bearer
string along with the auth token. Removed it and now it's working.
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server *-help
channels or Discussions for those types of questions.
Before opening, please confirm:
JavaScript Framework
React
Amplify APIs
GraphQL API
Amplify Categories
auth, api
Environment information
Describe the bug
After successfully logging in with AWS cognito user pool, I'm attempting to use the graphql interface with a request like this:
And am getting this response:
What I've done so far:
aws-exports.js
file aligns with the configuration when logging into the console.bearer
in the authorization header. When I remove the wordbearer
from the header in the JS request in postman, the request works.and
However, this returns nothing, nor is there a request that actually goes out. However, using the appsync client works for a mutation but not a query. I'd much rather use the Amplify SDK.
Expected behavior
Logging into the appsync console to execute the same request like so:
I am able to receive a successful 200 response. I'd expect the amplify interface to function the same.
Reproduction steps
Code Snippet
Log output
aws-exports.js
Manual configuration
No response
Additional configuration
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response