Replies: 1 comment
-
Do you mean several queries? i.e. something along the lines type Query {
foo(id: ID!): Foo
bar(id: ID!): Bar
baz(id: ID!): Baz
} Each one of those fields is resolved independently of each other. You definitely could use aspects around queries but IMHO that approach would rather be error prone and potentially could be simplified. If you need to fetch some common data for each one of those fields, maybe you could refactor the schema so they have common parent? type Query {
# function returns FooBarBaz that has common data that could be stored in private fields
fooBarBaz(id: ID!): FooBarBaz
}
type FooBarBaz {
# functions that return specific objects based on some common data from parent
foo: Foo
bar: Bar
baz: Baz
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have several endpoints which take for example a user ID. When sending a query that invokes several routes I want to perform something like an interceptor that will allow us to inject a model from another service into the router so That each route doesn't have to call the same service.
Is there something like @ControllerAdvice in this library?
Beta Was this translation helpful? Give feedback.
All reactions