notionsdk / notion-sdk-kotlin

MIT License
17 stars 2 forks source link

Support relational columns #1

Open derjogi opened 3 years ago

derjogi commented 3 years ago

Looks like relational field types (and possibly some other 'advanced' column types) aren't supported at the moment. Would be great to support those! :-)

To reproduce:

Exception in thread "main" kotlinx.serialization.json.internal.JsonDecodingException: Polymorphic serializer was not found for class discriminator 'relation'
JSON input: {"id":"%5Ezle","name":"Column","type":"relation","relation":{"database_id":"db-id-of-relational-db","synced_property_name":"Related to Testing (Column)","synced_property_id":":]]q"}}
petersamokhin commented 3 years ago

@derjogi sorry for the late reply but I can't reproduce the issue, both retrieveDatabase and queryDatabase methods work for me with the databases with relation columns. Could you please send an example of the JSON response from Notion API and an example code?

aivinog1 commented 2 years ago

@petersamokhin Hello! I'm able to reproduce this issue. You can find my table here. You can find my example here.