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
4
votes
3 answers

For an Amplify Datastore setup, is there a way to turn off AWS AppSync to just work locally?

I'm using Amplify Datastore with AppSync enabled. Data syncing is working between local and cloud, but having to execute amplify push to update cloud during development can suck up a lot of time. How can I turn off AWS AppSync?
Chuender
  • 103
  • 9
4
votes
1 answer

How to generate Typescript definitions from AppSync GraphQL schema if I am not using amplify?

I have my AppSync api set up using aws-cdk and am not using their amplify framework. I am trying to figure out how / if I can generate Typescript definitions from my AppSync schema.graphql file while not using amplify, i.e. no access to amplify…
Ilja
  • 44,142
  • 92
  • 275
  • 498
4
votes
2 answers

Failing to call GraphQL from Lambda using Amazon Amplify

I'm using Amazon Amplify to create a function that accesses the contentment of an AppSync GraphQL endpoint. Using the command line I create the new function and API and I can call it correctly from my front end application, however, I keep receiving…
4
votes
1 answer

How to check roles or permissions on AWS AppSync OIDC directive at the Graphql schema level

I am in the process of transitioning from Cognito to Auth0. For some of my AppSync queries and mutations, I have applied the @aws_auth directive, which can include a list of Cognito groups to control the level of access. The example below displays a…
srob
  • 125
  • 1
  • 6
4
votes
1 answer

AWS Amplify AppSync Subscription: data returning null

I was working on my Amplify App and I had subscriptions working fine with this: graphql: type Item @model(subscriptions: null) @auth(rules: [ {allow: owner}, {allow: groups, groups: ["Admin"], operations: [create, update, read,…
Moop
  • 91
  • 5
4
votes
0 answers

How can I delete the items that have a relation to another item in AppSync/Amplify?

I'm using the provided mutations that were created with AWS Amplify. I can delete the 'Store' object on its own using the provided delete function that Amplify generates, but the Product items that have a relation will remain. I know I could delete…
user7806336
4
votes
0 answers

AppSync GraphQL map 1-1 to an existing GraphQL API

I have an existing GraphQL API that exposes a schema like this: type AType { id: Int! name: String! children: [BType] } type BType { id: Int! name: String! } type Query { a(id: ID): A as: [A] } plus some other omitted…
V0ldek
  • 9,623
  • 1
  • 26
  • 57
4
votes
1 answer

Migrate from AWS AppSync to Apollo GraphQL (Javascript)

I am fairly new to GraphQL and have been using AWS AppSync service for GraphQL APIs. I use AWS Cognito for authentication/authorization, some Lambda functions and also have serverless RDS instance that is connected to my API. My question is: How can…
Myz
  • 818
  • 1
  • 8
  • 21
4
votes
0 answers

aws appsync subscriptions won't fire

I've been struggling with this for some time now, so I could use some help. I can't get onCreate subscription for type HealthPlan working in my react-native app. Based on Nader's example: schema.graphql type HealthPlan { id: ID! name:…
mnatan.brito
  • 883
  • 5
  • 18
  • 32
4
votes
0 answers

Adding an AWSJSON to an empty Map in dynamoDB through appsync-dynamoDB resolver

I am using appsync to store my data to dynamoDB and have 2 tables in dynamoDB. 1 table named Projects storing ID, data, userID and another table named UserProjects intending to store userID with all the IDs of the projects that the user owns, this…
4
votes
2 answers

AWS Amplify AppSync @function on a model field

I'm creating an Amplify Schema for a blog that looks something like this: type Post @model { id: ID! caption: String! src: String! } I want to add a new field in the Post model to calculate the number of times a Post was liked. It gets…
Alexa
  • 798
  • 7
  • 11
4
votes
1 answer

Full offline option using AWS DataStore and then allow an optional activation for the the cloud sync features in Android

I've started a project using AwsAppsync. The app is going to be offline first. And we want to offer the option to sync in the cloud as an extra option later if the customer wants it. So, I configured my project like this: In build.gradle added the…
Mariano L
  • 1,809
  • 4
  • 29
  • 51
4
votes
0 answers

AWS Amplify Datastore - How to Create Account > Users Authorization Rules in Schema?

Let say I have the following schema.graphql: type Account @model { id: ID! title: String! users: [User] @connection(name: "AccountUsers") } type User @model { id: ID! name: String! account: Account @connection(name:…
4
votes
1 answer

Store user attributes in Cognito or AppSync?

I'm using AWS Amplify and I'm wondering is it best to store user attributes as custom Cognito attributes or in a user table for AppSync? Cognito approach: 'username': 'jdoe', 'password': 'mysecurepassword#123', 'attributes': { 'email':…
Benck
  • 515
  • 1
  • 5
  • 17
4
votes
1 answer

AWS Amplify Custom Resolver - Unsupported operation 'BatchPutItem'

I'm following some guides to implement a custom resolver with BatchPutItem operation. Currently I'm facing some issues which I can't get right. The error output { "data": { "batchAddBusiness": null }, "errors": [ { "path": [ …