Questions tagged [aws-appsync]

AWS AppSync lets you build data-driven apps with real-time and offline-first capabilities based on GraphQL with custom resolver support for DynamoDB, ElasticSearch, AWS Lambda, and Local datasources.

Filter by
Sorted by
Tagged with
0 votes
0 answers
16 views

APPSYNC - Possible to use __typename for a sort key using a resolver mapping template?

I have a big table and need a sortkey to be able to retrieve all the items. I want the sortkey to use all the items so I would like to put it on the automatically generated '__typename' field. This ...
Rex Reyes's user avatar
0 votes
1 answer
20 views

Why use CfnAppSync rather than AppSync in CDK project?

We need to add new JS resolvers to our API, and phase out the VTL resolvers, for an AWS AppSync CDK project built with Cfn<> Cloud Front CDK, like this: let resolver = new CfnResolver(...
MonsCamus's user avatar
  • 133
0 votes
1 answer
11 views

"Cannot return null for non-nullable type: 'ID' within parent 'MasterBom' (/queryMasterBomWithin/id)"

so i have the model like this : type MasterBom @model @auth(rules:[{allow:groups,groups:["admin","handler"]}]){ id:ID! clientName:String! clientId:ID! @index(name: "...
marendra's user avatar
-2 votes
0 answers
16 views

Why does this AWS AppSync GraphQL query not work?

I am trying to create a appsync resolver to query an aurora-postgresql database. I have created a Movie table and have the following mutations(postMovie) and Queries(listMovies, getMoviesByName, ...
Skip Bassey's user avatar
0 votes
0 answers
14 views

Is it possible to set the auth type when evaluating resolver code via AppSync?

Aim To evaluate an AWS AppSync resolver template with a mock context identity for AMAZON_COGNITO_USER_POOLS authorization. Using Boto3 AppSync Client with either evaluate_mapping_template or ...
Vince's user avatar
  • 1
2 votes
1 answer
74 views

What causes the error "Unable to find the private GraphQL API for this domain."?

A lambda function deployed to private subnet attempting to access an AppSync GraphQL API through an appsync VPC endpoint fails with the error: "Unable to find the private GraphQL API for this ...
Dan Hook's user avatar
  • 6,879
1 vote
0 answers
27 views

Set-Cookie header not working AWS AppSync

i'm trying to Set Signature Cookies from AWS AppSync Resolver. /** * Sends a request to the attached data source * @param {import('@aws-appsync/utils').Context} ctx the context * @returns {*} the ...
kreyson's user avatar
  • 159
0 votes
0 answers
33 views

How do I pass header in appsync mutate for an amplify project

I have below code for an appsync mutate call. Where I am trying to pass header. const result = await client.mutate(buildMutation( client, gql(createTodo), { ...
Cristal's user avatar
  • 492
0 votes
1 answer
55 views

AWS AppSync Subscription to Mutation with object as input struggle

I want to create an EventBridge Rule that should trigger a a GraphQL Subscription over Appsync. Everything worked fine until I changed Service from an object to a string. My GraphQL Schema looks like ...
Tristan Müller's user avatar
0 votes
0 answers
33 views

How to selectively sync down data from cloud to datastore in my flutter app

I have two models in many to many relationship. type Ingredient @model @auth(rules: [{allow: public}]) { id: ID! name: String Recipes: [Recipe] @manyToMany(relationName: "RecipeIngredient&...
tamptek's user avatar
  • 23
1 vote
0 answers
39 views

AppSync JS resolver: DynamoDB update function does not accept condition object

I try to use import { update } from "@aws-appsync/utils/dynamodb"; to create a DynamoDBUpdateItemRequest. It works well with specifying key and update values, but when I add a condition, the ...
loki's user avatar
  • 215
0 votes
0 answers
18 views

How to avoid null in appsync subscription

i have a dynamodb with a table Book and dynamodb streams as the eventsource for a lambda function, when there is a change in the db it is consumed by the lambda function and the lambda then mutates ...
Sneha chowdary's user avatar
0 votes
0 answers
13 views

Why doesn't appsync customer domain support active/active multiple regions

I am thinking to setup Appsync in two regions and use Route53 routing policy to route traffic to different region. By reading this doc: https://aws.amazon.com/blogs/mobile/multi-region-deployment-aws-...
Joey Yi Zhao's user avatar
  • 38.9k
0 votes
1 answer
11 views

Add appsync as subgraph to apollo graphql supergraph

I have apollo supergraph created with two subgraphs working perfectly. I have used Rover commands to join subgraphs with supergraph. Now I'm trying to add appsync as a subgraph to my supergraph. I ...
srikanth gunuputi's user avatar
0 votes
1 answer
43 views

I get conditional exception even though the request meets condition in AppSync

Overview I am quite new to AppSync. Issue I could not limit PutItem command even though I set a condition in resolver. Query mutation MyMutation { createTodo(input: {description: "test", ...
rey's user avatar
  • 3
0 votes
0 answers
31 views

What is the purpose of .graphqlconfig.yml in AWS amplify?

From inspecting the file I see it holds information about my AppSync endpoint. However, this raises more questions: Should this file be in version control? If this file should be in version control, ...
Setjmp's user avatar
  • 27.6k
0 votes
0 answers
25 views

Amplify GraphQL V1 to V2 migration Authorization Issues

I have successfully followed this tutorial How to allow guest users to access web applications? (Amplify, AWS AppSync, Cognito & IAM) By installing @aws-amplify/[email protected] which uses [email protected] to ...
chris-j's user avatar
  • 61
0 votes
1 answer
55 views

Generic approach to tracking down why GraphQL fields are not showing up in Amplify/React query results

A pattern I have noticed when developing React apps on AWS/Amplify with Appsync integration is that it can be difficult to track down why certain fields defined in my GraphQL schema are undefined in ...
Setjmp's user avatar
  • 27.6k
0 votes
0 answers
30 views

Difference Between Amplify.DataStore.query and Amplify.API.query with QueryPredicate?

Why does the first method, which uses Amplify.DataStore.query, return 0 items from the table, while the second method, which uses Amplify.API.query with a queryPredicate, returns all the items in the ...
yossef's user avatar
  • 3
3 votes
1 answer
87 views

Best practices to not continuously call update APIs from mobile client

I'm kinda stuck on how would be the best way to implement this functionality of my app: a user has a cart and can add or remove how many items he wants throw a stepper (+ and - buttons). The cart is ...
L_Cleo's user avatar
  • 1,211
0 votes
1 answer
86 views

Authenticating Graphql using cognito user pool

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 ...
Pavan Kumar's user avatar
2 votes
1 answer
230 views

AWS amplify codegen: Namespace API has no exported member

My web app uses AWS resources, for example a Cognito user pool and an AppSync GraphQL API. These resources are maintained in a separate project. Whenever they are modified, I delete them using amplify ...
ssc's user avatar
  • 9,579
0 votes
0 answers
31 views

AWS Amplify DataStore causes syncing issues on login

Context I am using AWS Amplify for a full-stack website. The front end is React JS made by Create-React-App. I use the Amplify DataStore between the AppSync GraphQl API and the application. The ...
Lacrosse343's user avatar
0 votes
1 answer
13 views

Can anyone help understand the use of `needsConnectionLeftOpen` method in AWS SDK?

I am using AWS SDK to make calls to an appsync endpoint. However, I am unable to understand the significance of needsConnectionLeftOpen in this javadoc: https://docs.aws.amazon.com/AWSJavaSDK/latest/...
Raghav's user avatar
  • 81
0 votes
0 answers
10 views

AppSync Enhanced Filtering resolver

My schema: type Mutation { createOrder(order: OrderDTO!): Order! } type Subscription { onNewOrder(minimumPrice: Float): Order @aws_subscribe(mutations: ["createOrder"]) } My Lambda ...
nickolay.laptev's user avatar
0 votes
0 answers
37 views

AWS Appsync query with in or not in operator doesn't exist?

I want to return all items that are not in my arrays. Some think like below but in graphql-aws world: query( collection(db, "users"), where("id", "not-in", [......
kartal şahin's user avatar
-1 votes
1 answer
56 views

Lambda returning wrong data - type mismatch error, expected type LIST

In my schema.graphql I have set query: type Query { listCourses(param1: String, param2: String): [Course] and type Course: type Course { id: ID! fullname: String shortname: String idnumber: ...
user2450639's user avatar
0 votes
0 answers
100 views

AWS Amplify data not sync with dynamodb

Amplify studio data is not sync with dynamodb. Everything was good until recently Amplify studio data occasionally doesn't match the item in the dynamodb. Things I tried: Generating 100 items from ...
tamptek's user avatar
  • 23
0 votes
0 answers
18 views

aws-appsync gives version when package is updated

aws-appsync version 4.1.5 gives error this is my package.json file "@apollo/client": "^3.5.10", "@react-native-async-storage/async-storage": "^1.17.3", ...
Amruta Goyal's user avatar
2 votes
0 answers
98 views

Trying to import AWS Amplify iOS SDK along with AWS AppSync

I've a project that use AWS AppSync iOS SDK: https://github.com/awslabs/aws-mobile-appsync-sdk-ios . I want to migrate AWS Amplify: https://github.com/aws-amplify/amplify-swift . I've imported AWS ...
Idan Moshe's user avatar
  • 1,515
0 votes
0 answers
35 views

Auto update React.js front-end, when items added in DynamoDb

I'm developing a serverless AWS app. For the front-end I'm using react.js, for the back-end (REST API calls), I'm using Claudia API Builder (API Gateway & Lambdas) and I store my data in DynamoDB ...
Chris Ng's user avatar
0 votes
2 answers
174 views

AWS AppSync DynamoDB JS resolver - forward and backwards pagination

so I am trying to implement a GQL API using AppSync where I can query a paginated array of items that are stored on a dynamoDB table. My goal is to implemente a forward and backwards pagination system ...
Fabian Dios's user avatar
0 votes
2 answers
151 views

How to solve "The table does not have the specified index" problem in AppSync?

I use AWS AppSync to create a learning management system. Amplify version is 12.3.0. I tried to use a phoResultsByUserIdAndCreatedAt query but I got this error. [Error] The table does not have the ...
uekyo's user avatar
  • 431
0 votes
1 answer
76 views

GraphQL Authorization Error When Using AWS Lambda Trigger for Post-Confirmation

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 ...
Muhammad Umair Alim's user avatar
1 vote
0 answers
26 views

Issue with Accessing GraphQL Data Before Authentication on Android using Amplify

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 ...
Yohan Dushmantha's user avatar
0 votes
0 answers
21 views

Why is AWS asking for a Cognito Identity Pool when My schema is and based on API

I don't understand AWS Authorization yet. I'm getting this error. GraphQLAPI - ensure credentials error No Cognito Identity pool provided for unauthenticated access I thought by providing an API key ...
Michael Grills's user avatar
0 votes
0 answers
22 views

Log Retention for AppSync in CloudFormation

I am trying to find out, whether it is possible to set log retention for appsync log groups using CloudFormation. According to AWS Documentation for `LogConfig`, there is no such thing as log retency ...
Tina's user avatar
  • 88
0 votes
0 answers
105 views

where is Aws Appsync(sst) cors policy setting / code

I have created a form using Nextjs + AWS Appsync API, I want to embed that form into another website (WordPress) , While submitting the website send a status code 401, I have not set up a cors policy ...
Arjav Sethi's user avatar
0 votes
0 answers
59 views

Custom resolver / response VTL templates for fine grained auth with AppSync and DataStore

I have requirement for a non standard authentication model using amplify app sync. There are different levels of access that each user can have public private sensitive and for each of these there ...
Martin Slater's user avatar
0 votes
0 answers
70 views

Trying to fetch owner created data from Amplify GraphQL from NextJS React App

This is my first ever Stack overflow question and I'm a pretty new programmer. I can't figure out how to do a basic fetch from the API on Amplify based on the user being logged using Authenticator and ...
Michael Grills's user avatar
0 votes
0 answers
18 views

Error on Task UpdateBackendAPI on AWS StepFunction

{ "resourceType": "aws-sdk:amplifybackend", "resource": "updateBackendAPI", "error": "AmplifyBackend.AmplifyBackendException", "...
Leonardo Soares Bezerra's user avatar
0 votes
0 answers
56 views

Amplify DataStore Sync Issue when creating the entries through AppSync

I am creating the Flutter app using AWS Amplify. I have created a DataModel and called the observeQuery() function in my code to look for any changes in the Database. When I create an entry through my ...
Muhammad Azeem's user avatar
0 votes
0 answers
53 views

401 error returned on graphQL api on react.js app hosted by aws-amplify (AuthMode: "AMAZON_COGNITO_USER_POOLS")

I'm trying to set up a web app using react.js hosted by amplify on AWS, which I will need to store user preferences of certain categories in a dynamoDB table. Users must authenticate with Cognito ...
AjS's user avatar
  • 13
-1 votes
2 answers
316 views

Looking for a guide to access AWS Appsync Graphql api from NodeJS app via http request

There is currently, to my knowledge, no one guide that walks through this process so I'd like to find one that can be extended upon and commented on by others who may have extra security "best ...
Jezza's user avatar
  • 11
0 votes
0 answers
43 views

Flutter app datastore not syncing with DynamoDB

My flutter app cannot retrieve the newly added item in the DynamoDB. I have an item(id: abc012345) in the dynamodb. My flutter app allows me to display the item by their id. Initially, I searched the ...
tamptek's user avatar
  • 23
0 votes
0 answers
75 views

How can I pass Appsync IAM authentication via curl command

I am using Appsync for graphql application and use IAM authentication for some of the mutations. My question is how I can use curl command to send a mutation request to Appsync which is using IAM ...
Joey Yi Zhao's user avatar
  • 38.9k
0 votes
0 answers
20 views

Direct connection to Graphql API using full admin IAM credentials for Custom Business Logic

Is there a way to use my own nodejs server and admin IAM credentials to perform graphql queries against an amplify graphql API backend with no restrictions so that I can implement my own business ...
seanEd's user avatar
  • 1,011
0 votes
0 answers
48 views

How can we execute two queries with same $context in AppSync

How can I store IP, keyword, and other details from OpenSearch response to DynamoDB using AWS AppSync? I have a setup involving AWS AppSync with OpenSearch and DynamoDB. My objective is to perform a ...
Ameer Amr's user avatar
0 votes
0 answers
19 views

Issues with ElasticSearch wildcard filter and hyphenated text

I am using ElasticSearch as part of AWS OpenSearch. I am using the AppSync query builder to apply a wildcard: filter on a date field with the format 2023-07-28T16:19:23.196Z. I am interested in ...
Max Christy's user avatar
0 votes
1 answer
63 views

AppSync VTL resolver - how to resolve parse error

I'm getting this error on my VTL response mapping and I'm not sure what it means graphql: Encountered "}" at velocity[line 9, column 3] Was expecting one of: ...
jordan's user avatar
  • 9,772

1
2 3 4 5
36