Skip to content

Always return dict for entity.data #289

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

Closed

Conversation

martastain
Copy link
Member

Return "{}" instead of null for empty entity.data fields in graphql.

image

In REST, it seems it already wored fine:

image

Please consider if this is a desired behavior - since in graphql it is necessary to json.loads the data field, using "null" would allow skip this and gain a little performance (it is much easier to validate is None than parsing the json string)

@martastain martastain linked an issue Jul 22, 2024 that may be closed by this pull request
@martastain martastain self-assigned this Jul 22, 2024
@martastain martastain requested a review from iLLiCiTiT July 22, 2024 07:35
@martastain martastain added the type: bug Something isn't working label Jul 22, 2024
@martastain
Copy link
Member Author

Closing - handled in ayon-python-api: ynput/ayon-python-api#166

@martastain martastain closed this Jul 23, 2024
@martastain martastain deleted the 288-entity-field-data-returns-none-if-empty branch April 22, 2025 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Entity: Field 'data' returns 'None' if empty
1 participant