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.

1785 questions
0
votes
1 answer

AppSync: create resource with a sub type

Good evening everyone, I'm using the AWS AppSync "Create Resources" option, "Define new Type". So I wanted to add a new type. The type I want to add has a sub type inside a list. Here is my example of schema: type Object { id:ID! sub_objects:…
foxtrot
  • 1,056
  • 1
  • 8
  • 24
0
votes
1 answer

After migrating to pure websocket, I get a GraphQL subscription error on AWS Appsync

Due to some recent AWS restrictions, I can not use MQTT over Websockets any more when using GraphQL subscriptions on Appsync. Based on this link from AWS, I changed my Python codebase. It seems to connect correctly, but when subscribing, I receive…
fcracker79
  • 1,118
  • 13
  • 26
0
votes
1 answer

Appsync custom resolver error "Unable to transform Response Template"

I am trying to write "BatchPutItem" custom resolver, so that I can create multiple items (not more than 25 at a time), which should accept a list of arguments and then perform a batch operation. Here is the code which I have in…
HackRx
  • 198
  • 2
  • 14
0
votes
1 answer

Returning String or [String] in Appsync schema

I'm searching for an answer to this problem, and it seems others have as well but no clear answer I could find anywhere (Appsync query union return type throws 400) I have a GraphlQL type that has a property than can return either a String or an…
geeberry
  • 617
  • 2
  • 10
  • 17
0
votes
1 answer

How to send enum Type fields to GraphQL/AWS appsync from react

This is code section.. companyStatus: userCtx.user.category this section is generating error in the code. This field is actually enum type field in the schema.graphql Can anyone please help me how to write that section? companyName is working fine,…
0
votes
1 answer

Lambda function can not access appsync

I have a lambda function create by amplify to get a list of donors from appsync but it will get UnauthorizedException every time I try to request. Here is my lambda function: const axios = require('axios'); const gql = require('graphql-tag'); const…
Brandon Heng
  • 117
  • 2
  • 8
0
votes
1 answer

Retrofit to GraphQL

I have an Android app that will be using data from GraphQL API via AWS Appsync. I know most resources point to Apollo as the client library to use, but due to our CICD, generating the models is not entirely possible, or I haven't found good…
Trayson Keli'i
  • 313
  • 2
  • 8
0
votes
2 answers

Using AWSAppSyncClient inside an ECS Container (Fargate) with AWS_IAM auth mode - Returns 403 UnrecognizedClientException

We have the following code in an ECS Fargate container however it is constantly returning an error. When running identical code in a lambda with IAM authentication and the correct role setup, I am able to successfully run this. Error Network error:…
Matt
  • 1,490
  • 2
  • 17
  • 41
0
votes
1 answer

Java pass \ in the input String - Java Graphql Json

I have a mutation query to be passed to aappsync graphql query as shown below which should be passed from Java client code { "query": "mutation UpdateUser{setUserInformationAdmin(information:…
Manushi
  • 597
  • 1
  • 7
  • 26
0
votes
1 answer

Terraform - AWS AppSync Graph API with Lambda Authoriser

I'm trying to use a Lambda authoriser with the AppSync module for Terraform. Here's my current terraform module "appsync" { source = "terraform-aws-modules/appsync/aws" name = "api-appsync-${var.region}-${var.stage_name}" schema =…
0
votes
1 answer

best practice for very simple relation on a nosql table

I am using a dynamoDB table with GraphQL api to store posts. I want a user to be able to mark certain posts as favorites. I have thought to create a relation table of user to post, but I also thought to just add an array of userId's to the post…
alionthego
  • 8,508
  • 9
  • 52
  • 125
0
votes
1 answer

AWS Amplify GraphQL - allow owner to create, but only if he belongs to a certain group

Suppose I have three user groups: admin, doctor, and patient I want both admin and doctor to be able to create the type Appointment, but I want to forbid patient to do it. To simplify let's suppose that anyone from the 3 groups can read any…
Filipe Aleixo
  • 3,924
  • 3
  • 41
  • 74
0
votes
1 answer

AWS App Sync Subscriptions over MQTT is not supported

While using AWS AppSync SDK to add subscription its returning this error, but I got the result in AWS console. errorType: "BadRequestException" message: "Subscriptions over MQTT is not supported." I have seen this similar question and tried the…
0
votes
1 answer

Using `$utils.defaultIfNullOrEmpty` to save Boolean Value

When the user does not send $context.arguments.input.isActive I replace this null value to a default one, like this: #set($isActive = $utils.defaultIfNullOrEmpty($context.arguments.input.isActive, true)) But for some reason, this isActive is saved…
0
votes
2 answers

How to convert python datetime to AWSTimestamp - appsync scalar type?

How to convert python datetime to AWSTimestamp - appsync scalar type? Python format: 2021-07-14 09:11:48.563323 to AWSTimestamp format: 1930-01-01T16:00:00-07:00
Thirumal
  • 8,280
  • 11
  • 53
  • 103