The following is done correctly in the schedule
fragment BookGridFields on Book { _id title } { allBooks { ...BookGridFields } }
My question is, can I specify a fragment directly in my scheme, right below where my type of book is defined, for example
type Book { _id: String title: String pages: Int weight: Float authors: [Author] } fragment BookGridFields on Book { _id title }
So I can just run queries like this
{ allBooks { ...BookGridFields } }
without having to define a fragment as part of my request.
Currently the above errors with
Unknown fragment \ "BookGridFields \"
javascript graphql graphql-js
Adam rackis
source share