Tag: aws-amplify
-
Get indexed objects with query, not just ids
0 Newby here with amplify and graphql. I am using amplify v6: https://docs.amplify.aws/react-native/build-a-backend/graphqlapi/data-modeling/ for react native. I was under the impression that graphql would return actual objects within an index, not just the objects id. So I think I have something configured wrong in my schema.graphql since all the queries are generated for me. Or,…
-
How to use AWS Amplify GraphQL search and aggregate queries in React code?
0 In the current AWS Amplify React documentation there are no any examples showing how to use these GraphQL queries in React code. Can someone please post an example here. Authentication method needs be the API_KEY. Thanks. query SearchStudentsByEmail { searchStudents(filter: { name: { eq: "Rene Brandel" } }) { items { id name email…
-
Amplify sort property from a model
0 I’m using graphql from amplify I have a 2 models Conversation and Message. Message model belongs to Conversation (conversation has many messages) So when I get Conversation by some criteria I want my messages to be sorted based on created at property. Is there a way to do that? sorting graphql aws-amplify Share Improve…
-
Amplify GraphQL query is success failed to parse
0 I have implemented an GraphQL query using amplify. Query is getting success but response is not getting parsed. Query Model static func getStationStateList(deviceUUID:String) -> GraphQLRequest<StationStateList>{ let operationName = "getStationStateList" let document = """ query getStationStateList { getStationStateList(DeviceUUID: "(deviceUUID)") { items { SK Data } } } """ return GraphQLRequest<StationStateList>(document: document, responseType: StationStateList.self, decodePath: operationName)…
-
How to unit test function that calls Amplify Api mutate method?
0 I have a system that is using Amplify Api to interact with a GraphQL api that is not part of an Amplify project. None of it was set up with the amplify-cli. I have a function that makes a call to the mutate function of the AmplifyCategory class. I would like to unit test…
-
Amplify GraphQL order points by lat-long
0 I have a graphql query that returns a list of pullup bar objects. Query: query PullUpBarsByDate($userID: String) { PullUpBarsByDate( type: "PullUpBar" sortDirection: DESC ) { items { id lat lng userID } } } Returns something like this: [ { id: "rf6zrd1prm", lat: 63.50235889533083, lng: 28.426290788320724, }, { id: "y80ymnlgzi7", lat: 62.5654380797649, lng: 17.338090077030582,…
-
React-native AWS amplify graphQl Subscription
0 In my react native project, I am using graphQl subscription with aws-amplify. The problem is it’s not getting notified/called when the backend sends a notification. The backend developer told me, that from their side notification is sending correctly. Now from the Front end side setup is also properly done because one other subscription is…
-
How to sort the list in nested query result in an AWS Amplify application
0 I am new to GraphQL and looking for some assistance in understanding how I could go by to sort the results of a nested query. I have a schema as below, based on the documentation here – https://docs.amplify.aws/guides/api-graphql/query-with-sorting/q/platform/js/ type Segment @model { id: ID! name: String! order: Float! type: String! @index(name: "byOrder", queryField: "segmentByOrder",…
-
GraphQL schema for DynamoDB
0 I’m using DynamoDB and want to create a database with GraphQL API. How do I have to define my schema so my partition key is userID and my sort key is MMYY. Every userID has a lot of MMYY, and every MMYY has entries which are just some data. I want all of these…
-
Looking for a guide to access AWS Appsync Graphql api from NodeJS app via http request
-1 There is currently, to my knowledge, no one guide that walks through this process so I’d like to find one that can be extended upon and commented on by others who may have extra security "best practices" and the likes to contribute. node.js graphql amazon-iam aws-amplify aws-appsync Share Improve this question Follow edited Aug…