71 questions
0
votes
1
answer
62
views
I have a working AWS Appsync application that uses OPENID_CONNECT as authorization, when I added API_KEY as additional broke the old routes
I have a working AWS Appsync application that uses OPENID_CONNECT as authorization, when I added API_KEY as additional broke the old routes. For some reason in the appsync schema it had in all routes ...
0
votes
0
answers
16
views
Logging error when function fails in AWS Appsync
I was trying to understand where in stash are errors stored when a function fails in AppSync.
My resolver template looks like follows:
export function request(ctx) {
// performs some operation
return {...
1
vote
2
answers
129
views
Set an authType of "User Pool Authorization" when testing a GraphQL resolver in the AppSync console
I am trying to debug authentication rules on a GraphQL API (one created by Amplify).
I can open the AWS AppSync Console and see the auth functions that Amplify has created for my Message object: the ...
0
votes
1
answer
143
views
How to resolve String field using AWS appsync javascript resolver with NONE resource
I have this appsync GraphQL schema with type
type Place {
id: ID!
name: String!
nameTranslations: FieldTranslations
}
And then I have resolvers for this type and paginated type that works just ...
0
votes
1
answer
135
views
AppSync util method converts filter to non valid condition object
I want to grab the results using my sort key (resource_id) and a property defining the user's workspace id. But I run into the following error message every time: "code.js:15:12: Property 'filter'...
1
vote
1
answer
182
views
message: `RDSHttp:{"message":"The schema parameter isn't supported."}` I am getting this error when calling api fro appsync and rds
I am getting this error and my 2-3 app is affected.Can Anyone help me to resolve it
I tried most of the way provided ,If I am creating new Api then its working but for older one its not working.If ...
1
vote
0
answers
101
views
Issue with Overriding Subscription Function Code in AppSync Resolver Pipeline
I’m currently working on an AWS AppSync project and I’m facing an issue with overriding the default subscription function in my resolver pipeline. Here is a detailed explanation of the problem:
...
2
votes
3
answers
608
views
aws appsync custom subscription resolver: connection failed, runtime error
What i'm trying to achieve: custom javascript resolver for a subscription.
I understand that when you use appsync and create a type for e.g.
type chatMessage { channel: String! userId: String! text: ...
0
votes
1
answer
125
views
AWS AppSync VTL Templates failing
I have a Appsync VTL Template and it errors out when I have a #if inside of a #foreach block.
Is this even the right syntax
If not, how can I write this code?
#foreach($method in $body....
0
votes
1
answer
528
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: "...
2
votes
0
answers
191
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 ...
0
votes
1
answer
343
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:
...
0
votes
1
answer
641
views
AWS Appsync + VTL template. Template transformation yielded an empty response
When I send a mutation request with invalid data, I get the following body:
{
"data": {
"updateForm": null
},
"errors": [
{
"path": [
...
1
vote
1
answer
575
views
Appsync VTL resolvers assigning null to a an object
I extended the default resolvers I received from Amplify/Appsync for one of my models.
I saved my code as Mutation.updateMovement.preUpdate.1.req.vtl, and here's my VTL file:
#set( $muscleGroups = $...
0
votes
1
answer
221
views
Is it possible to execute more than one operation in appsync javascript resolver?
I want to send a query with filterexpression and limit in javascript resolver to DynamoDB . DynamoDB returns the matching values up to the limit, and a key in LastEvaluatedKey to apply in a subsequent ...
1
vote
1
answer
270
views
AppSync how to check if a variable is an array in javascript resolver
I'm new in AWS AppSync. I just need to check if a variable is an array. I've already tried following ways but they are not working.
1. Array.isArray(variable)
I got an error when I run this code
This ...
1
vote
0
answers
136
views
Typescript custom bundling
I'm testing out AWS AppSync JS Resolvers and i'm currently building them in TS. To be able to use them I transpile each TS file to a JS file to be able to use them as JS Resolver in AWS AppSync and ...
0
votes
1
answer
190
views
how to extract my appsync resolver from my sam template
I'm implementing substacks in my AWS serverless app, I would like to know if there is a way to extract the from my template of appsync resolvers the content that is in the field RequestMappingTemplate,...
2
votes
3
answers
912
views
AppSync JavaScript Support for Array.sort of objects
While implementing JS resolvers in AWS AppSync, I can't find a way to sort an Array of objects.
The documentation of AppSync (https://docs.aws.amazon.com/appsync/latest/devguide/built-in-objects-...
0
votes
1
answer
257
views
How to get the unicode of a character in Apache Velocity (VTL)
Im trying to obtain the Unicode(code) of a character in VTL.
For example I would like to get the number 902 from the character Ά
The analogue in JS would be:
'Ά'.charCodeAt(0)
902
Similarly the char ...
0
votes
0
answers
496
views
Terraform AWS dependency problem between AppSync resolver and AppSync function
When I will create the AppSync resolver with linked function by the terraform, everything is created and it works.
But error will arise, If I will rename the function in terraform file, which is ...
0
votes
1
answer
817
views
AppSync/GraphQL filter nested objects
I have a DynamoDB table with the following structure
site (String)
addresses (List)
|-> address (String)
|-> isCurrent (Boolean)
I want to filter a specific site for either ...
3
votes
1
answer
550
views
AWS AppSync: No option to add Lambda resolver
I have created an AppSync API and a lambda data source and a resolver to provide data for it. I managed to successfully run queries a couple of days ago.
I wanted to attach a second lambda resolver ...
0
votes
2
answers
526
views
Floats rounded down in AWS AppSync VTL
I am creating a resolvers response mapping in AWS AppSync which is meant to perform a math calculation and return a percentage value as a float:
#set( $result = $ctx.source.total * 100 / 365000 )
$...
0
votes
1
answer
39
views
Does the auto generated query to list a type by Appsync always do a full table scan?
I have this type that I've defined below. And appsync will build out the query to retrieve a list. When I look in dynamodb the id is the primary key. So is it me or is this extremely inefficient as it ...