Questions tagged [resolver]

363 questions
0
votes
2 answers

type-graphql : Can't figure out how to create a resolver in case a class extending another class

I have a FinalClass that extends a BasicClass, with 2 additional fields of 2 other Classes. Basic Class and the 2 other Classes are linked to typeOrm Entites and a foreignkey in each class enabled to join the data. I want the final class to gather…
Jerome
  • 2,429
  • 2
  • 22
  • 37
0
votes
1 answer

Why am i only seeing 1 record not 2 records?

I am only seeing 1 record when there are 2. The Resolver Response mapping section is $utils.toJson($utils.rds.toJsonObject($ctx.result)[0][0]) I figured out if I change: $utils.toJson($utils.rds.toJsonObject($ctx.result)[0][0]) to: …
0
votes
1 answer

Resolver function for union type in Ariadne

I am trying to write a query resolver function for union type in Ariadne. How can I accomplish this? As I have read in the documentation there is a field called __typename which helps us to resolve the union type. But I am not getting any __typename…
Manisha Bayya
  • 137
  • 1
  • 9
0
votes
2 answers

Route resolver angular check if data is empty

I have a resolver like this: export class TaskResolver implements Resolve { constructor(private taskService: TaskService) { } resolve(route: ActivatedRouteSnapshot): Observable { const taskId = route.params.taskId; …
Miomir Dancevic
  • 6,726
  • 15
  • 74
  • 142
0
votes
0 answers

Followed GraphQL tutorial / Resolver object to query MySQL DB fails

Developing entirely local, I followed the tutorial here: https://scotch.io/tutorials/super-simple-graphql-with-node#toc-creating-the-graphql-server Hardly any modification, only to restrict the focus to a "product" table. No "User" or "Recipe"…
Bob
  • 15
  • 6
0
votes
1 answer

Parent is only ID in GraphQL resolver

So I have a relational mongo database that looks something like this Location { _id: ... shopIDs: } Shops { _id: ... ... } Also I already have my GraphQL Setup in place and the Schema. But…
Saigo
  • 53
  • 1
  • 6
0
votes
1 answer

Unable to access object property except by stringify/parse before the data in Graphql/resolver context

Unable to access my resolver returned object, however, I can see its content, but accessing properties returns an undefined. Only solution I found is using Stringify/Parse on my value. Using JSON Stringify then PARSE on my Object turns it to be…
Finkle
  • 53
  • 6
0
votes
1 answer

Aws Appsync Resolver : How to create a resolver to update item in list map (DynaMoDB)

I am creating multiple object in one table, I have here sample DynamoDB table named "User" with fields (firstname, lastname, email, companies), can someone know how can I create a resolver to add a new item in histories? Thanks. { "id":…
0
votes
2 answers

Appsync 'Batch Create' Resolver gives "mapping template" error

I'm trying to create a resolver for a BatchCreateIngredients mutation I created, but when I run the mutation I'm getting an error of type MappingTemplate and I'm not sure why. My table's name is IngredientsTable and I'm not using any cognito…
0
votes
0 answers

Angular 7 - Resolver API and paginator logic?

How can I resolve a component with the Resolver Service and at the same time subscribe to URL changes in the component to enable paginating, after the component was rendered. Please see picture down below: When using a Resolver e. g.…
Okyo
  • 357
  • 4
  • 17
0
votes
2 answers

Angular 4 routes are calling ngOnInit every time component is loaded repeating API call

I have a little webapp that basically lists a player list and when user clicks on the player name, it shows player details. It uses two api calls, one for list and other to load details of selected player. My problem is that when i go back from…
Sfrag
  • 9
  • 6
0
votes
1 answer

Dynamically append function to AppSync Pipeline Resolver via CloudFormation

I am currently developing an AppSync based API in a domain driven manner, so we need to put a function to an already created Pipeline Resolver. Does anybody know if there is there any chance doing this via CloudFormation without using a custom…
0
votes
1 answer

GraphQL - Prisma - resolvers using external API

I'am having this schema: type Invoice { id: ID! @unique description: String charge: Charge } type Charge { id: ID! @unique amount: Float dataFromAPI: DataFromAPI } type DataFromAPI { id: ID! @unique status: String } in the Query…
Alan
  • 9,167
  • 4
  • 52
  • 70
0
votes
1 answer

Angular Material - pagination not working after resolving route

I am using angular-material 2 to make tables. I have a case in which I am resolving data before page loads, It works fine but the problem is pagination is not working after that. drivers-routing.module.ts const routes: Routes = [{ path: '', …
Usman Iqbal
  • 2,379
  • 5
  • 26
  • 50
0
votes
1 answer

Angular Elements Events not firing e.g. ngOnInit

I think this is something I am doing wrong, but I don't know what. I want routing in my Angular web component, and I can get routing to work. However the components used in the routing outlet don't work correctly if I use a resolver. The Events…
user1506481
  • 119
  • 2
  • 6