Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(amplify-appsync-simulator): auth directive unauthorized message #6038

Merged
merged 1 commit into from Dec 4, 2020

Conversation

robpre
Copy link
Contributor

@robpre robpre commented Dec 2, 2020

Issue #, if available:

Description of changes:

In current master the simulate server can respond with "message": "Cannot read property 'key' of undefined", when using the auth directive. Which I tracked down to this line:


the auth directive handler seemingly passes down the wrong field from the Graphql info object.


Fixed by passing the correctly shaped info object and typing the constructor params.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Fixed by passing the correctly shaped info object and typing the constructor params
@codecov
Copy link

codecov bot commented Dec 2, 2020

Codecov Report

Merging #6038 (d2254c5) into master (db9bf58) will not change coverage.
The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master    #6038    +/-   ##
========================================
  Coverage   58.21%   58.21%            
========================================
  Files         440      440            
  Lines       20160    20160            
  Branches     3988     3782   -206     
========================================
  Hits        11736    11736            
- Misses       7609     7629    +20     
+ Partials      815      795    -20     
Impacted Files Coverage Δ
...fy-appsync-simulator/src/schema/directives/auth.ts 20.28% <0.00%> (ø)
...lify-appsync-simulator/src/velocity/util/errors.ts 80.95% <ø> (ø)
packages/amplify-util-mock/src/api/api.ts 0.00% <0.00%> (ø)
packages/graphql-mapping-template/src/print.ts 35.29% <0.00%> (ø)
packages/amplify-util-mock/src/storage/storage.ts 0.00% <0.00%> (ø)
...ges/amplify-util-mock/src/CFNParser/stack/index.ts 0.00% <0.00%> (ø)
...es/amplify-util-mock/src/api/resolver-overrides.ts 0.00% <0.00%> (ø)
...es/graphql-transformer-core/src/stripDirectives.ts 35.29% <0.00%> (ø)
.../amplify-cli-core/src/state-manager/pathManager.ts 67.85% <0.00%> (ø)
.../amplify-util-mock/src/utils/lambda/loadMinimal.ts 0.00% <0.00%> (ø)
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 296ae55...d2254c5. Read the comment docs.

@attilah attilah changed the title fix(amplify-appsync-simulator): auth directive unauthorised message fix(amplify-appsync-simulator): auth directive unauthorized message Dec 4, 2020
@ammarkarachi ammarkarachi merged commit 10b94c0 into aws-amplify:master Dec 4, 2020
@github-actions
Copy link

github-actions bot commented Dec 5, 2021

This pull request 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 for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants