Tag: aws-amplify
-
Promise.all is only executing 1 out of 3 promises I pass to it
0 I have an async function, in which I take some arguments. Based on what is passed as argument, I call another function. You can consider the structure to be something like this. async function createTaskReminder(val) { switch (val) { case 1: await call1(); case 2: await call2(); case 3: await call3(); } I call…
-
Alternatives to AWS Amplify DataStore with offline capabilities for GraphQL
1 I’ve developed a project using AWS Amplify and DataStore. It was a requirement that the app works offline, because most of my users are travelling in areas with poor or no signal. DataStore seemed like a perfect solution, but it has given me far too many problems. Performance is awful when dealing with more…
-
Records that I query in console from Amplify Datastore are different then the ones in Amplify Content
0 I’m new to AWS and React Native and I’m trying to create an aplication that will use AWS Datastore as database to store data. Right now i have this in my App.js import React, { useEffect } from "react" import {SafeAreaView, StyleSheet} from ‘react-native’ import Navigation from ‘./src/navigation’ import { Amplify, DataStore } from…
-
Authenticating Graphql using cognito user pool
0 I need help in connecting to Graphql(AWS AppSync) API using Amazon Cognito pool using Javascript/Nodejs. I am able to connect to Graphql using API key (API_KEY) as the authentication mechanism. But I need to change the Authentication mechanism to using Cognito pool (AMAZON_COGNITO_USER_POOLS). I know that we need to collect the JWT token and…
-
AWS amplify graphql appsync – do not return deleted items?
9 I am using AWS amplify with graphql and appsync. When I do a standard list query, appsync includes deleted items in the list of items it returns. What can I do to make it return only items that are not deleted? I tried this query, but it throws an error: query MyQuery($filter: ModelFrameFilterInput =…
-
In AWS AppSync VTL resolvers how to change a value before writing it to the datasource?
0 With this req template I can send the event to a lambda where I can check and edit some user input fields: { "version": "2018-05-29", "operation": "Invoke", "payload": { "typeName": "$ctx.stash.get("typeName")", "fieldName": "$ctx.stash.get("fieldName")", "arguments": $util.toJson($ctx.arguments), "identity": $util.toJson($ctx.identity), "source": $util.toJson($ctx.source), "request": $util.toJson($ctx.request), "prev": $util.toJson($ctx.prev) } } My lambda is correctly triggered. I’m not sure what…
-
GraphQL mutate operation failed. NonRetryableException{message=OkHttp client request failed., cause=null, recoverySuggestion=Irrecoverable error}
2 Graphql mutation operation fails in android but works in AppSync console Error: GraphQL mutate operation failed E/amplify:flutter:api( 4899): NonRetryableException{message=OkHttp client request failed., cause=null, recoverySuggestion=Irrecoverable error} E/amplify:flutter:api( 4899): at com.amplifyframework.api.aws.AppSyncGraphQLOperation$OkHttpCallback.onResponse(AppSyncGraphQLOperation.java:145) E/amplify:flutter:api( 4899): at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:519) E/amplify:flutter:api( 4899): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) E/amplify:flutter:api( 4899): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) E/amplify:flutter:api( 4899): at java.lang.Thread.run(Thread.java:920) W/AtomicResult(mutate)( 4899): Attempted to send success value after initial…
-
Error: @default only accepts scalar types, which might be why the array lints badly
0 I’m trying to amplify push my updated amplify/backend/api/<myAPIName>/schema.graphql file. I am getting the following error: An error occurred during the push operation: / Schema validation failed. Expected type String, found ["Admins", "Users"]. canRead: [String] @default(value: ["Admins", "Users"]) Expected type String, found ["Admins", "Users"]. The offending code in schema.graphql: type Card { … canRead: [String]…
-
GraphQL Authorization Error When Using AWS Lambda Trigger for Post-Confirmation
0 I am encountering an authorization error when trying to execute a GraphQL mutation (createPlayer) in an AWS Lambda function that is triggered after user confirmation. The error message I’m receiving is: **PostConfirmation failed with error GraphQL error: Not Authorized to access createPlayer on type Mutattion ** Lambda Function (Node.js): const appsync = require("aws-appsync"); const…
-
Issue with Accessing GraphQL Data Before Authentication on Android using Amplify
0 Question: Hello everyone, I’m relatively new to Amplify and currently working on a mobile application using React Native. The app is being developed for both Android and iOS platforms. I’ve integrated Amplify Auth and a GraphQL API into the app. While I’m able to access GraphQL data before authentication on iOS successfully, I’m encountering…