question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How are resolvers actually attached? Cannot see proper resolver.

See original GitHub issue

** Which Category is your question related to? ** Generation of fields resolvers

** What AWS Services are you utilizing? ** AWS AppSync

** Provide additional details e.g. code snippets ** My local schema looks like this:

type BookEntity @model @searchable {
  id: ID!
  bookSection: String!
  bookOrder: String!
  bookCode: String!
  bookCodeTitleRu: String!
  bookElementOrder: String!
  type: String!
  content: AWSJSON!
  notes: [Note] @connection(name: "BookEntityNotes")
  bookmarks: [Bookmark] @connection(name: "BookEntityBookmarks")
  highlights: [Highlight] @connection(name: "BookEntityHighlights")
}
type Note 
  @model 
  @auth(rules: [{allow: owner}])
{
  id: ID!
  content: String!
  bookEntity: BookEntity! @connection(name: "BookEntityNotes")
}
type Bookmark
  @model 
  @auth(rules: [{allow: owner}])
{
  id: ID!
  bookEntity: BookEntity! @connection(name: "BookEntityBookmarks")
}
type Highlight
  @model 
  @auth(rules: [{allow: owner}])
{
  id: ID!
  bookEntity: BookEntity! @connection(name: "BookEntityHighlights")
}

After amplify push and placing items in BookEntity DynamoDB table I can successfully query BookEntities using following query:

export const listBookEntitys = `query ListBookEntitys(
  $filter: ModelBookEntityFilterInput
  $limit: Int
  $nextToken: String
) {
  listBookEntitys(filter: $filter, limit: $limit, nextToken: $nextToken) {
    items {
      id
      bookSection
     ...

Now, I want to see how an actual resolver works for this query in AWS AppSync Console. So I go there…

In the console’s schema definition, I see:

listBookEntitys(filter: ModelBookEntityFilterInput, limit: Int, nextToken: String): ModelBookEntityConnection

ModelBookEntityConnection:

type ModelBookEntityConnection {
	items: [BookEntity]
	nextToken: String
}
screen shot 2018-12-15 at 08 59 01

I see that there is no resolver attached to items field or BookEntity one. What am I missing? How is this works on the front but do not have any resolvers on the back?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7

github_iconTop GitHub Comments

2reactions
jamesw6811commented, Aug 13, 2019

I spent two hours trying to figure out why my “attach resolver” buttons weren’t showing up before finding this issue and scrolling right. I have a moderate resolution screen. Maybe this is a bug, just in the appsync UI?

1reaction
jamesw6811commented, Jan 10, 2020

@muhendzera @jkeys-ecg-nmsu I’m not sure who should be capturing this issue - but it’s a big deal.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AppSync detached resolvers · Issue #146 - GitHub
It is possible for resolvers to become detached when an incorrect schema is deployed and correcting the schema does not reattach the ...
Read more >
Test and debug resolvers (VTL) - AWS AppSync
AWS AppSync executes resolvers on a GraphQL field against a data source. As described in Resolver mapping template overview, resolvers communicate with data ......
Read more >
Resolvers - an overview | ScienceDirect Topics
One possible solution is to couple two resolvers by using a gear system (see Fig. 4.15) so that the second resolver will rotate...
Read more >
Angular routing resolver not resolving - Stack Overflow
Try using. take(1) or first. operator to mark the completion of Observable . The resolve waits for Observable to complete before continuing.
Read more >
API (GraphQL) - Overwrite & customize resolvers - Amplify Docs
Let's say you have a simple schema.graphql... ... and you want to change the behavior of request mapping template for the Query.getTodo resolver...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found