Ash FrameworkAF
Ash Frameworkβ€’3y agoβ€’
28 replies
Jan Ulbrich

GraphQL Relationship Resolved w/o Context

Hi there, πŸ‘‹

I have a query like

{
  alarm(filter: {id: { eq: 4711}}) {
    message
    events(sort: {field: ID, order: DESC}) {
      id
      message
    }
  }
}


which I need to filter with a Ash.Query.after_action.

The filter is called as expected, but the actor of the request (available in the outer filter with the correct value) is nil for this nested.

Do I manually need to forward the context in some way or might that be a bug?

This is the stack trace raising an exception from Ash.Query.after_action (no error, but manually raised to get the stack):

(ash_graphql 0.25.5) lib/graphql/resolver.ex:1806: AshGraphql.Graphql.Resolver.to_resolution/3
(absinthe 1.7.1) lib/absinthe/middleware/dataloader.ex:37: Absinthe.Middleware.Dataloader.get_result/2
(absinthe 1.7.1) lib/absinthe/phase/document/execution/resolution.ex:232: Absinthe.Phase.Document.Execution.Resolution.reduce_resolution/1
(absinthe 1.7.1) lib/absinthe/phase/document/execution/resolution.ex:187: Absinthe.Phase.Document.Execution.Resolution.do_resolve_field/3
...
(phoenix 1.6.16) lib/phoenix/router/route.ex:41: Phoenix.Router.Route.call/2
(phoenix 1.6.16) lib/phoenix/router.ex:354: Phoenix.Router.__call__/2
Was this page helpful?