mirror of
https://github.com/status-im/sourcecred.git
synced 2025-03-02 13:10:31 +00:00
mirror: add reaction to snapshot test query (#1615)
Summary: Upcoming changes will add support for field-level fidelity annotations (see #998), at which point the `Reaction.user` field will be marked unfaithful. This patch will surface that behavior change. Test Plan: The newly snapshotted query is valid, and returns a reaction whose `user` property lists typename and ID. wchargin-branch: mirror-snapshot-reaction
This commit is contained in:
parent
d6a2618e9e
commit
86c31415c7
src/graphql
@ -259,6 +259,17 @@ exports[`graphql/mirror Mirror _updateOwnData snapshot test for actual GitHub qu
|
||||
title
|
||||
}
|
||||
}
|
||||
reaction: node(id: \\"MDg6UmVhY3Rpb24yOTUzNDM4Mw==\\") {
|
||||
... on Reaction {
|
||||
__typename
|
||||
id
|
||||
content
|
||||
user {
|
||||
__typename
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
commit: node(id: \\"MDY6Q29tbWl0MTIwMTQ1NTcwOjU1OTUwZjUzNTQ1NTEwOWJhNDhhYmYyYjk3N2U2NmFhMWNjMzVlNjk=\\") {
|
||||
... on Commit {
|
||||
__typename
|
||||
|
@ -2364,6 +2364,7 @@ describe("graphql/mirror", () => {
|
||||
const db = new Database(":memory:");
|
||||
const mirror = new Mirror(db, buildGithubSchema());
|
||||
const exampleIssueId = "MDU6SXNzdWUzNDg1NDA0NjE=";
|
||||
const exampleReactionId = "MDg6UmVhY3Rpb24yOTUzNDM4Mw==";
|
||||
const exampleCommitId =
|
||||
"MDY6Q29tbWl0MTIwMTQ1NTcwOjU1OTUwZjUzNTQ1NTEwOWJhNDhhYmYyYjk3N2U2NmFhMWNjMzVlNjk=";
|
||||
const b = Queries.build;
|
||||
@ -2377,6 +2378,12 @@ describe("graphql/mirror", () => {
|
||||
b.inlineFragment("Issue", mirror._queryOwnData("Issue")),
|
||||
])
|
||||
),
|
||||
b.alias(
|
||||
"reaction",
|
||||
b.field("node", {id: b.literal(exampleReactionId)}, [
|
||||
b.inlineFragment("Reaction", mirror._queryOwnData("Reaction")),
|
||||
])
|
||||
),
|
||||
b.alias(
|
||||
"commit",
|
||||
b.field("node", {id: b.literal(exampleCommitId)}, [
|
||||
|
Loading…
x
Reference in New Issue
Block a user