Skip to content

[Node] Custom ID inflected from schema.#4

Closed
alloy wants to merge 8 commits into
masterfrom
custom-node-id-take-2
Closed

[Node] Custom ID inflected from schema.#4
alloy wants to merge 8 commits into
masterfrom
custom-node-id-take-2

Conversation

@alloy
Copy link
Copy Markdown

@alloy alloy commented Sep 8, 2017

This is Relay v1.3.0 patched to inflect the ID from our schema, which in our case is __id.

Now that this is merged into Emission master artsy/emission#616, we’ll start extensive testing and I’ll start cleaning up the commits in this branch, see if things can be improved, and send an upstream PR.

In Emission we’re actually using a slightly modified version of this branch, which:

@alloy alloy mentioned this pull request Sep 8, 2017
20 tasks
selections: flattenArray(node.selections),
};
},
constructor(idField: string) {
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Rather than having to pass the ‘Node ID’ field in, I’m wondering if I can revert this change and instead encode the ‘Node ID’ into the metadata of the selection 🤔

}
`.replace(/^\s{8}/gm, '').trim());
});
});
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Should probably refactor this to work similar to the other fixture based tests.

@alloy alloy closed this Aug 4, 2018
@alloy alloy deleted the custom-node-id-take-2 branch August 4, 2018 14:53
@peril-staging
Copy link
Copy Markdown

peril-staging Bot commented Aug 4, 2018

Danger run resulted in 1 warning; to find out more, see the checks page.

Generated by 🚫 dangerJS

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.

1 participant