Skip to content

Conversation

@nikgraf
Copy link
Collaborator

@nikgraf nikgraf commented Mar 14, 2025

I need it for Hypergraph since we generate entities locally with IDs and then later when we want to publish them we want to ensure they are identical.

@nikgraf nikgraf requested a review from baiirun March 14, 2025 15:47
@nikgraf nikgraf self-assigned this Mar 14, 2025
@changeset-bot
Copy link

changeset-bot bot commented Mar 14, 2025

🦋 Changeset detected

Latest commit: 1caf64f

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

This PR includes changesets to release 1 package
Name Type
@graphprotocol/grc-20 Minor

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

@nikgraf nikgraf force-pushed the ng/allow-to-provide-id branch from 70c3c67 to dad8103 Compare March 14, 2025 15:58
const ops: Array<Op> = [];
const { cid, dimensions } = await uploadImage(params);
const { id, ops: imageOps } = Image.make({ cid, dimensions });
const { id, ops: imageOps } = Image.make({ cid, dimensions, id: providedId });
Copy link
Contributor

Choose a reason for hiding this comment

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

Same question

const { name, description, cover } = params;
const entityId = generate();
const { id, name, description, cover } = params;
const entityId = id ?? generate();
Copy link
Contributor

Choose a reason for hiding this comment

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

Same question

export const createType = ({ name, description, cover, properties }: CreateTypeParams): CreateResult => {
const id = generate();
export const createType = ({ id: providedId, name, description, cover, properties }: CreateTypeParams): CreateResult => {
const id = providedId ?? generate();
Copy link
Contributor

Choose a reason for hiding this comment

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

Aaand same question

@nikgraf nikgraf merged commit 21997e9 into main Mar 14, 2025
3 checks passed
@nikgraf nikgraf deleted the ng/allow-to-provide-id branch March 14, 2025 17:42
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.

3 participants