Revert Relay Classic non-support (#3606)

This reverts commit e8551b994d313ea023855a790c87acc4833150f9.
master
Jimmy Jia 2017-12-29 12:14:08 -08:00 committed by Christopher Chedeau
parent 833666a394
commit cfb8987ecd
3 changed files with 5 additions and 33 deletions

View File

@ -34,15 +34,16 @@ function embed(path, print, textToDoc /*, options */) {
* graphql`...`
* graphql.experimental`...`
* gql`...`
*
* This intentionally excludes Relay Classic tags, as Prettier does not
* support Relay Classic formatting.
*/
if (
parent &&
((parent.type === "TaggedTemplateExpression" &&
((parent.tag.type === "MemberExpression" &&
((parent.tag.object.name === "graphql" &&
parent.tag.property.name === "experimental") ||
(parent.tag.object.name === "Relay" &&
parent.tag.property.name === "QL"))) ||
parent.tag.object.name === "graphql" &&
parent.tag.property.name === "experimental") ||
(parent.tag.type === "Identifier" &&
(parent.tag.name === "gql" || parent.tag.name === "graphql")))) ||
(parent.type === "CallExpression" &&

View File

@ -394,7 +394,6 @@ gql\`
exports[`react-relay.js 1`] = `
const { graphql } = require("react-relay");
const Relay = require("react-relay/classic");
graphql\`
mutation MarkReadNotificationMutation(
@ -411,17 +410,8 @@ 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!) {
@ -443,14 +433,4 @@ graphql.experimental\`
}
\`;
Relay.QL\`
mutation MarkReadNotificationMutation($input: MarkReadNotificationData!) {
markReadNotification(data: $input) {
notification {
seenState
}
}
}
\`;
`;

View File

@ -1,5 +1,4 @@
const { graphql } = require("react-relay");
const Relay = require("react-relay/classic");
graphql`
mutation MarkReadNotificationMutation(
@ -16,11 +15,3 @@ graphql.experimental`
)
{ markReadNotification(data: $input ) { notification {seenState} } }
`;
Relay.QL`
mutation MarkReadNotificationMutation(
$input
: MarkReadNotificationData!
)
{ markReadNotification(data: $input ) { notification {seenState} } }
`;