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/ownerReference #1078

Merged
merged 2 commits into from
Jan 10, 2025
Merged

Conversation

carlosallexandre
Copy link
Contributor

Motivation

Fix #1034

The actual ownerReference keep resolving to { id: string, collection: 'users' } for some unknown reason.

Changes introduced

  1. It replaces the reference from the ownerReference to a union of string and an object with id and collection. The string refers to the owner id. The object with id and collection keep compatibility with reference in case someone use like that.

  2. It adds a collection utility to get the owner based on the onwerReference.

It replaces the `reference` from the ownerReference to a union of
string and an object with id and collection. The string refers to
the owner id. The object with id and collection keep compatibility
with `reference` in case someone use like that.

It adds a collection utility to get the owner from the onwerReference.

Fix event-catalog#1034
Copy link

changeset-bot bot commented Jan 8, 2025

🦋 Changeset detected

Latest commit: bcec21e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@eventcatalog/core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@carlosallexandre carlosallexandre changed the title fix: change ownerReference to union of string and object fix/ownerReference Jan 8, 2025
@boyney123
Copy link
Collaborator

Thanks, just gave it a try and seems to work nicely. Yeah odd how it stopped working all the sudden.

Thanks for the PR let's get it in!

@boyney123 boyney123 merged commit 04ab91d into event-catalog:main Jan 10, 2025
4 checks passed
@carlosallexandre carlosallexandre deleted the fix/owners-reference branch January 10, 2025 14:51
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.

users → <myteam> was not found
2 participants