You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I have a StreamBlock. In this StreamBlock, I have table_block = TableBlock(), using wagtail TableBlock.
I tried a classic graphql_fields=[GraphQLStreamfield("table_block")] but I have an "Unknown type 'TableBlock' error.
So I tried to register this StreamField. I already have a CustomTableBlock(TableBlock), with its get_api_representation method overridden, to just expose the rendered HTML table in DRF (works just fine and that is what I want to do with grapple). So I tried to register it with @register_streamfield_block, to use it in my StreamBlock, but I then have metaclass conflict.
I can't figure how to use grapple with this non-conventional block. I guess I'll have the same problem with other blocks like CodeBlock, etc.
Can you help to solve this TableBlock issue ? I am no expert and pretty lost.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I have a
StreamBlock
. In thisStreamBlock
, I havetable_block = TableBlock()
, using wagtailTableBlock
.I tried a classic
graphql_fields=[GraphQLStreamfield("table_block")]
but I have an"Unknown type 'TableBlock'
error.So I tried to register this
StreamField
. I already have aCustomTableBlock(TableBlock)
, with itsget_api_representation
method overridden, to just expose the rendered HTML table in DRF (works just fine and that is what I want to do with grapple). So I tried to register it with@register_streamfield_block
, to use it in myStreamBlock
, but I then havemetaclass conflict
.I can't figure how to use grapple with this non-conventional block. I guess I'll have the same problem with other blocks like
CodeBlock
, etc.Can you help to solve this
TableBlock
issue ? I am no expert and pretty lost.Thank you.
Beta Was this translation helpful? Give feedback.
All reactions