Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: new notion relation requires new properties #143

Merged
merged 1 commit into from
Jul 3, 2023
Merged

Conversation

brunoluiz
Copy link
Contributor

@brunoluiz brunoluiz commented Jul 2, 2023

If you try to use this package as it is together with relations it will not work. This because Notion introduced two new fields that seem to have been a breaking change (although they say it was not). The changelog is available here.

This pull request adds the new fields and add the required constants to be used. A relation then needs to be used as:

			"Something": notionapi.RelationPropertyConfig{
				Type: notionapi.PropertyConfigTypeRelation,
				Relation: notionapi.RelationConfig{
					DatabaseID:     tables.Venues,
					Type:           notionapi.RelationSingleProperty, // NEW
					SingleProperty: &notionapi.SingleProperty{}, // NEW
				},
			},

Copy link
Owner

@jomei jomei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

@jomei jomei merged commit 069db92 into jomei:main Jul 3, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants