wagtail-grapple icon indicating copy to clipboard operation
wagtail-grapple copied to clipboard

Document the need for `graphql_fields` on custom rendition models

Open zerolab opened this issue 2 years ago • 0 comments

When using a custom image model, with a custom rendition model one needs to add

 graphql_fields = [
        GraphQLString("id"),
        GraphQLString("url"),
        GraphQLString("width"),
        GraphQLString("height"),
        GraphQLImage("image"),
        GraphQLString("file"),
    ]

to the custom rendition model. (Alternatively https://github.com/torchbox/wagtail-grapple/blob/566967686fdaf0da27ea70e7cc75098da75aa0e9/example/images/models.py#L16-L35)

Document, or fix so it is not needed

zerolab avatar Jul 25 '22 15:07 zerolab