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
12
votes
2 answers

How to use Apollo Client with AppSync?

AppSync uses MQTT over WebSockets for its subscription, yet Apollo uses WebSockets. Neither Subscription component or subscribeForMore in Query component works for me when using apollo with AppSync. One AppSync feature that generated a lot of buzz…
C.Lee
  • 10,451
  • 9
  • 31
  • 46
12
votes
1 answer

How do I subscribe directly to my AWS AppSync data source?

I have a DynamoDB connected to step functions and I am building a UI to display changes. I connected the DB to an AppSync instance and have tried using subscriptions through AppSync, but it seems they only observe mutations within the current…
Kemal Ahmed
  • 638
  • 6
  • 15
11
votes
2 answers

AppSync GraphQL query with nextToken

My schema.graphql file auto generated below query in graphql/queries.js file by running amplify push command. Here is the schema file that generates query automatically. schema.graphql type User @model { id: String! uuid: String! following:…
Skate to Eat
  • 2,554
  • 5
  • 21
  • 53
11
votes
1 answer

How to pass default GraphQL arguments to AWS AppSync resolver

AWS AppSync allow to define default values in schema like that type Foo { bar( arg: Int = 20 ): Bar! } or that type Foo { bar( arg: Int! = 20 ): Bar! } But either way when the value is not explicitly defined, the default value is…
Yves M.
  • 29,855
  • 23
  • 108
  • 144
11
votes
3 answers

Is it possible to build offline-first mobile apps using AWS AppSync?

I'd like to use AWS AppSync for mobile development (Android/iOS) but I’m not sure about its offline capabilities. According to the documentation the data will be accessible while being offline and synced automatically if the client gets online…
Steffen
  • 2,197
  • 2
  • 24
  • 38
10
votes
2 answers

AWS Appsync Invoke mutate from Lambda?

I have a client app subscribed to Appysync events. The data source is a Lambda function to RDS. Is it possible to Invoke the mutate from Lambda function which gets triggered on RDS update?
Deepan
  • 1,559
  • 3
  • 14
  • 18
10
votes
3 answers

Serverless GraphQL Subscriptions

I recently started working with GraphQL and have been able to successful set it up on AWS Lambda giving me a "serverless" architecture. However I would like to utilize GraphQL Subscriptions for more realtime functionality. I understand that AWS…
9
votes
3 answers

AWS amplify graphql appsync - do not return deleted items?

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…
BitFunny
  • 196
  • 1
  • 10
9
votes
1 answer

AWS App Sync Subscriptions not working because of MQTT error

I am calling this graphql subscription on my react app: export const OnCreateMessage = ` subscription OnCreateMessage($conversationId: ID!) { onCreateMessage(messageConversationId: $conversationId) { id content authorId …
Mikey K
  • 91
  • 1
  • 3
9
votes
2 answers

How to disable introspection queries with AWS appsync (GraphQL)?

With the compliance we need to remove introspection queries in production for AppSync endpoints. What is the best way to disable introspection queries with AppSync? I don't see any settings with AppSync.
Kannaiyan
  • 12,554
  • 3
  • 44
  • 83
9
votes
1 answer

Appsync & GraphQL: how to filter a list by nested value

I have an Appsync API generated by Amplify from a basic schema. On the Article model, a category field is nested within a metadata field. I want to build a Query that provides a list of Articles filtered by category. It is not clear to me how to…
Kwhitejr
  • 2,206
  • 5
  • 29
  • 49
9
votes
3 answers

How to properly handle unauthenticated users and requests in AWS Amplify/AppSync React apps?

I am having a very hard time to figure out how to handle unauthenticated users in a React app which uses AWS Amplify and AWS AppSync. Seems like most docs suggest to wrap the whole app with withAuthenticator HOC from aws-amplify-react but in the…
SaidAkh
  • 1,661
  • 4
  • 15
  • 28
9
votes
2 answers

AppSync GraphQL mutation server logic in resolvers

I am having issues finding good sources for / figuring out how to correctly add server-side validation to my AppSync GraphQL mutations. In essence I used AWS dashboard to define my AppSync schema, hence had DynamoDB tables created for me, plus some…
Ilja
  • 44,142
  • 92
  • 275
  • 498
9
votes
2 answers

React-Apollo Mutation returns empty response

I am using AWS Appsync where I want to get a response from a successfully executed mutation. When I try my setup in the Appsync Graphql console I get a filled "data": { "mutateMeeting" } response: When I try the same in my react application I can…
DrDirk
  • 1,937
  • 3
  • 25
  • 36
9
votes
2 answers

appsync subscription with arguments

We are having huge troubles with subscriptions with arguments to simplify the problem Here are the steps to reproduce create a simpleSchema type Mutation { testSubMutation(param: String!): String } type Query { testQuery: String } type…