Category : aws-amplify

for example: """ A user device """ type device @model { id: ID! statusID: Int! devFunctionIDs: [Int]! functions: [devFunction] @connection(fields: ["devFunctionIDs"]) } """ A function or feature of a device """ type devFunction @model { id: Int! functionName: String! } In this situation I have an array of Int which correlate to functions. The array ..

Read more

I’m using an imported Cognito user pool, but the authenticated users session has no nocognito:groups. const session = await Auth.currentSession() console.log(session.accessToken.payload["cognito:groups"]) This user belongs to 2 groups and they should be returned, however, I get undefined, why? Payload: Session: null attributes: Object authenticationFlowType: "USER_SRP_AUTH" client: Client keyPrefix: "CognitoIdentityServiceProvider.1t4s5opd30mmmlkf4dikq052bjsn" pool: CognitoUserPool preferredMFA: "NOMFA" signInUserSession: CognitoUserSession storage: ..

Read more

i’m making an application on react native and i have linked AWS authentication to my app. However, everytime i yarn add @react-native-async-storage/async-storage the following errors come up: yarn add v1.22.10 [1/4] 🔍 Resolving packages… [2/4] 🚚 Fetching packages… warning [email protected]: The engine "firefox" appears to be invalid. warning [email protected]: The engine "fennec" appears to be ..

Read more

I’m using cognito user pools for user management and using the flow of forgotPassword a confirmation code is sent to the user. For UI purposes I need to validate the code that is sent when I call the API ForgotPassword without sending the new password yet. I need like a middle step between ForgotPassword and ..

Read more

I need to get some custom attributes from Cognito, and to do something with that info. I have this function: const getMyAttribute = async (): string => { const userInfo = await Auth.currentUserInfo(); console.log(‘userInfo’, userInfo); return userInfo.attributes[‘custom:myAttribute’] }; And I’m calling it here in some React Component with: const myAttribute = getMyAttribute(); console.log(‘myAttribute:’, myAttribute); // ..

Read more

I am trying to model a deeply nested relationship and am getting a strange data structure in response when querying for the outcome. Here is my schemal.graphql file: type Page @model { id: ID! settings: String active_menu: ID } type MenuItemOption @model @key(name: "byMenuItem", fields: ["menuitemID"]) { id: ID! title: String price: Int menuitemID: ID! ..

Read more

Here are a few hypothesis that I’ve formed, please tell me how on or off they in-fact are. So, most things boil down to cloudformations, service configurations. Incidentally AWS GUI console screens closely match them. To make CloudFormations easier to work with, three higher level services/abstractions are built on top (and all compile down to ..

Read more