code: function getValidGraphQLTag(path: any): ?DocumentNode {
    const tag = path.get('tag');
  
    if (!tag.isIdentifier({name: 'graphql'})) {
      return null;
    }
  
    const quasis = path.node.quasi.quasis;
  
    if (quasis.length !== 1) {
      throw new Error(
        'BabelPluginRelay: Substitutions are not allowed in graphql fragments. ' +
          'Included fragments should be referenced as `...MyModule_propName`.',
      );
    }
  
    const text = quasis[0].value.raw;
  
    const ast = GraphQL.parse(text);
  
    if (ast.definitions.length === 0) {
      throw new Error('BabelPluginRelay: Unexpected empty graphql tag.');
    }
  
    return ast;
  }
docs: Given a babel AST path to a tagged template literal, return an AST if it is
  a graphql literal being used in a valid way.
  If it is some other type of template literal then return nothing.