({ node, parent })
| 105 | * support Relay Classic formatting. |
| 106 | */ |
| 107 | function isEmbedGraphQL({ node, parent }) { |
| 108 | return ( |
| 109 | hasLanguageComment({ node, parent }, "GraphQL") || |
| 110 | (parent && |
| 111 | ((parent.type === "TaggedTemplateExpression" && |
| 112 | ((parent.tag.type === "MemberExpression" && |
| 113 | parent.tag.object.name === "graphql" && |
| 114 | parent.tag.property.name === "experimental") || |
| 115 | (parent.tag.type === "Identifier" && |
| 116 | (parent.tag.name === "gql" || parent.tag.name === "graphql")))) || |
| 117 | (parent.type === "CallExpression" && |
| 118 | parent.callee.type === "Identifier" && |
| 119 | parent.callee.name === "graphql"))) |
| 120 | ); |
| 121 | } |
| 122 | |
| 123 | export { isEmbedGraphQL, printEmbedGraphQL }; |
nothing calls this directly
no test coverage detected
searching dependent graphs…