Support Relay Classic (#3595)
parent
b0647cb2c9
commit
bbfc450cd2
|
@ -39,8 +39,10 @@ function embed(path, print, textToDoc /*, options */) {
|
|||
parent &&
|
||||
((parent.type === "TaggedTemplateExpression" &&
|
||||
((parent.tag.type === "MemberExpression" &&
|
||||
parent.tag.object.name === "graphql" &&
|
||||
parent.tag.property.name === "experimental") ||
|
||||
((parent.tag.object.name === "graphql" &&
|
||||
parent.tag.property.name === "experimental") ||
|
||||
(parent.tag.object.name === "Relay" &&
|
||||
parent.tag.property.name === "QL"))) ||
|
||||
(parent.tag.type === "Identifier" &&
|
||||
(parent.tag.name === "gql" || parent.tag.name === "graphql")))) ||
|
||||
(parent.type === "CallExpression" &&
|
||||
|
|
|
@ -394,6 +394,7 @@ gql\`
|
|||
|
||||
exports[`react-relay.js 1`] = `
|
||||
const { graphql } = require("react-relay");
|
||||
const Relay = require("react-relay/classic");
|
||||
|
||||
graphql\`
|
||||
mutation MarkReadNotificationMutation(
|
||||
|
@ -410,8 +411,17 @@ graphql.experimental\`
|
|||
)
|
||||
{ markReadNotification(data: $input ) { notification {seenState} } }
|
||||
\`;
|
||||
|
||||
Relay.QL\`
|
||||
mutation MarkReadNotificationMutation(
|
||||
$input
|
||||
: MarkReadNotificationData!
|
||||
)
|
||||
{ markReadNotification(data: $input ) { notification {seenState} } }
|
||||
\`;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
const { graphql } = require("react-relay");
|
||||
const Relay = require("react-relay/classic");
|
||||
|
||||
graphql\`
|
||||
mutation MarkReadNotificationMutation($input: MarkReadNotificationData!) {
|
||||
|
@ -433,4 +443,14 @@ graphql.experimental\`
|
|||
}
|
||||
\`;
|
||||
|
||||
Relay.QL\`
|
||||
mutation MarkReadNotificationMutation($input: MarkReadNotificationData!) {
|
||||
markReadNotification(data: $input) {
|
||||
notification {
|
||||
seenState
|
||||
}
|
||||
}
|
||||
}
|
||||
\`;
|
||||
|
||||
`;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
const { graphql } = require("react-relay");
|
||||
const Relay = require("react-relay/classic");
|
||||
|
||||
graphql`
|
||||
mutation MarkReadNotificationMutation(
|
||||
|
@ -15,3 +16,11 @@ graphql.experimental`
|
|||
)
|
||||
{ markReadNotification(data: $input ) { notification {seenState} } }
|
||||
`;
|
||||
|
||||
Relay.QL`
|
||||
mutation MarkReadNotificationMutation(
|
||||
$input
|
||||
: MarkReadNotificationData!
|
||||
)
|
||||
{ markReadNotification(data: $input ) { notification {seenState} } }
|
||||
`;
|
||||
|
|
Loading…
Reference in New Issue