Questions tagged [appsync-apollo-client]
33 questions
16
votes
6 answers
AWS AppSync: pass arguments from parent resolver to children
In AWS AppSync, arguments send on the main query don't seem to be forwarded to all children resolvers.
type Query {
article(id: String!, consistentRead: Boolean): Article
book(id: String!, consistentRead: Boolean): Book
}
type Article {
…

joshblour
- 1,024
- 10
- 19
16
votes
2 answers
Custom filtering on subscription in AWS AppSync
Is it possible to have custom filtering logic on subscription in AWS AppSync?
As I know, current behavior is:
e.g. my schema is like the following
type Mutation {
createEvent(userId: ID!, event: Event!): Event!
}
type Subscription {
…

Vincent Pang
- 422
- 4
- 8
14
votes
1 answer
AWS Appsync $ctx vs $context in resolvers
I understand that context is what ever name you define in your Lambda functions but when it comes to Appsync resolvers I'm a bit confused. I've seen both $ctx and $context being used in AppSync resolvers including in AWS docs. Some of AWS's own code…

user3376065
- 1,137
- 1
- 13
- 31
11
votes
0 answers
How to get around the "Missing field" warning when executing a mutation with an optimiticResponse in the apollo-client?
I'm using aws-appsync with the apollo-client and when I try to execute a mutation without providing all fields I get a warning like "Missing field x in {...}". Do I really need to provide all (including optional) fields? How can I handle this…

Wim Vandebriel
- 111
- 3
6
votes
2 answers
AWS AppSync Event Subscription Filtering on Cognito User
I have the following Schema:
input CreateEventInput {
userID: String!
eventID: ID!
type: String!
data: String
dateTime: AWSDateTime!
}
type Mutation {
createEvent(input: CreateEventInput!): event
}
type Subscription {
…

Drew
- 701
- 2
- 10
- 22
4
votes
0 answers
Apollo cache is getting reset back to old data
I'm building an Expo mobile app using AWS AppSync and Apollo and I've got an intermittent but very serious issue with the cache getting corrupted, or at least not being updated properly. Unfortunately, because I'm using AppSync and I want the…

DenisH
- 859
- 8
- 12
4
votes
0 answers
AppSync GraphQL @connection query
I have a graphql type with a one-to-many connection to another type. I want to filter the many using the one. So Amplify has generated the graphql schema but in the input for the list query there isn't a value for the connection to use.
The…

adamdaly
- 315
- 2
- 12
3
votes
1 answer
React Native, GraphQL, Apollo - how to create batch insert mutation
I need to create a batch insert mutation call in react native Here is my code. will you please solve my problem. I don't know where I have done a mistake. while onHandleSubmit data is not inserting in the table.
On submitting only am passing the…
2
votes
1 answer
ApolloProvider useQuery combination does not fetch data from AWS AppSync, in React project
Situation
Due to the compatible issue, I am using ApolloClient to form my AWS AppSync API client, so that I can use ApolloProvider to pass the client to different sub-component.
In the sub-component, I call useQuery to fetch data, but the problem is…

Runkun Miao
- 335
- 1
- 3
- 14
2
votes
1 answer
How to do versioning of the AWS AppSync Schema
I have a usecase where I need to update the schema of the AWS AppSync. Since my app users will be having different versions of the app, the schema which needs to be used will be different for different versions.
Is there a way to do versioning of…

Kanhai Agarwal
- 135
- 1
- 11
2
votes
1 answer
How to use GraphQL enums in frontend code (e.g. in a
I have a simple GraphQL enum defined like the following:
enum PassType {
DailyFit
StarterFit
MonthlyFit
QuarterlyFit
DoubleFit
MultiFit10
MultiFit20
}
I would like to reuse these values in a

Akasha
- 2,162
- 1
- 29
- 47
1
vote
0 answers
AWS AppSync GraphQL -- Nested Input Tyes
I'm trying to use a GraphQL Input Type inside another Input Type (AKA a nested Input Type) for a GraphQL mutation via aws-appsync's Apollo Client, inside my React-Native app.
input S3ObjectInput {
bucket: String!
key: String!
region:…

user608578
- 211
- 2
- 5
1
vote
1 answer
Unable to auth into AppSync GraphQL api from Lambda using IAM and AppSyncClient
I'm using an amplify stack and need to perform some actions to my graphql api which has dynamodb behind it. The request in my lambda function returns an Unauthorized error: "Not Authorized to access getSourceSync on type SourceSync", where…

Eagl3
- 199
- 1
- 15
1
vote
0 answers
How disable making auto network requests for mutations when offline in AWS AppSync Client React App?
Performed a mutation when offline is not throwing the error immediately. AppSync does multiple requests automatically (I guess this is an offline capability) and then after it throws Error: Network error: Failed to fetch.
I have added …

Venky
- 31
- 6
1
vote
0 answers
Appsync and Apollo Client, how to handle caching of lists with dataIdFromObject?
There are currently cache items that are accessed fine that are simple objects but struggling with what should happen when the object passed in to dataIdFromObject is an object with a key of items which is an array of objects. For example:
const…

Hard-Boiled Wonderland
- 1,359
- 3
- 17
- 32