"Field list is empty" when only using @GraphQLField via deriveContextObjectType
See original GitHub issueExample:
trait Query {
val db: Our.Db
import db._
@GraphQLField
def allUsers: Seq[User] = db.run(quote(query[User]))
}
object Query {
case class Ctx(query: Query)
implicit val UserOutType = deriveObjectType[Ctx, User]()
implicit val queryType = deriveContextObjectType[Ctx, Query, Unit](_.query)
val schema = Schema(queryType)
}
This works just fine if I use:
implicit val queryType =
deriveContextObjectType[Ctx, Query, Unit](_.query, IncludeMethods("allUsers"))
I’ve tried reading over the macro a time or two but the cause doesn’t jump out at me.
Any ideas?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:18 (7 by maintainers)
Top Results From Across the Web
Using nullability in GraphQL
In the following schema, we have a Restaurant type with a location field that refers to a Location type: type Restaurant { name:...
Read more >Class: GraphQL::Schema::Field
Create a field instance from a list of arguments, keyword arguments, and a block. ... The Resolver this field was derived from, if...
Read more >"Derived" field resolver for GraphQL using Hot Chocolate and ...
The FullName field does show up in the GraphQL query but it is always blank. I think the Employee instance e that is...
Read more >Execution - GraphQL Java
To execute a query against a schema, build a new GraphQL object with the ... the field's parent object, the query root object...
Read more >ObjectType - Graphene-Python
GraphQL Argument defaults¶ ... If you define an argument for a field that is not required (and in a query execution it is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Have the same issue. Scala 2.12.3. Sangria 1.2.2
interesting fact: looks like annotation with parameters like
@GraphQLTags(...)
is never missed.