You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Gen 2][Swift][Fix doc example] Do not merge. I want to report bug on the Swift example on creating a Lambda function
Do not merge this change.
I just want to report bug on the Swift example on creating a Lambda function.
If we don't have the "authMode: AWSAuthorizationType.amazonCognitoUserPools" change, I will get the following run time error when my Swift app make the GraphQL request:
```
"Not Authorized to access sayHello on type Query"
```
Regarding the following change, ...
```
struct SayHelloResponse: Codable {
public let sayHello: String
}
struct PushNotifyRequest {
private static let document =
"""
query EchoQuery($name: String!) {
sayHello(name: $name)
}
"""
```
Since the "sayHello" only returns a String, a String struct doesn't have properties, such as "name" or "executionDuration". So I remove those two properties.
I only know how to fix the Swift example. I haven't fix the example for other platforms.
Below is the document I would like to fix.
https://github.com/aws-amplify/docs/blob/main/src/pages/%5Bplatform%5D/build-a-backend/functions/set-up-function/index.mdx
0 commit comments