-
Notifications
You must be signed in to change notification settings - Fork 82
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
migrate local server to FastAPI #1577
Conversation
578bbe5
to
b98fa5c
Compare
# GraphQL queries are always sent as POST | ||
# Note: Passing the request to the context is optional. | ||
# In Flask, the current request is always accessible as flask.request | ||
data = request.get_json() | ||
data = await request.json() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, why is this request async? I might be getting it wrong, but is it just waiting for the request data? Because the graphql_sync call is synchronous no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.json()
is declared as async thus to get the results we must await it, otherwise we get back a promise. Thus if you have to call await you must declare the calling method as async.
{ | ||
'id': 'AwsSolutions-SMG4', | ||
'reason': 'Database is used for test purposes', | ||
}, | ||
] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we get this exception in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think because I upgraded the aws-cdk-lib
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Tested locally!
Feature or Bugfix
Detail
Testing
Penting succesful run on dev pipeline
Security
Please answer the questions below briefly where applicable, or write
N/A
. Based onOWASP 10.
fetching data from storage outside the application (e.g. a database, an S3 bucket)?
eval
or similar functions are used?By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.