torchbox / wagtail-grapple

A Wagtail app that makes building GraphQL endpoints a breeze!
https://wagtail-grapple.readthedocs.io/en/latest/
Other
152 stars 57 forks source link

Query Collections from graphql #66

Closed fabienheureux closed 4 years ago

fabienheureux commented 4 years ago

I am trying to query Wagtail Collections from graphql.

I registered the Collection model as a snippet, using register_snippet(Collection) function from wagtail.snippets.models, but the model instances are not returned when I query snippets

{
  snippets {
    __typename
  }
}

Any idea how I could return collections alongside other snippets defined in my models ?

fabienheureux commented 4 years ago

https://github.com/torchbox/wagtail-grapple/pull/67