CoolFace
Datasetpublic

basant307/AI_Governance_Project

sourceHugging Faceapache-2.0updated 2mo agoView on Hugging Face
0likes48downloads
graphql.js79 linesDownload Raw Back to languages
1/*2 Language: GraphQL3 Author: John Foster (GH jf990), and others4 Description: GraphQL is a query language for APIs5 Category: web, common6*/7 8/** @type LanguageFn */9function graphql(hljs) {10  const regex = hljs.regex;11  const GQL_NAME = /[_A-Za-z][_0-9A-Za-z]*/;12  return {13    name: "GraphQL",14    aliases: [ "gql" ],15    case_insensitive: true,16    disableAutodetect: false,17    keywords: {18      keyword: [19        "query",20        "mutation",21        "subscription",22        "type",23        "input",24        "schema",25        "directive",26        "interface",27        "union",28        "scalar",29        "fragment",30        "enum",31        "on"32      ],33      literal: [34        "true",35        "false",36        "null"37      ]38    },39    contains: [40      hljs.HASH_COMMENT_MODE,41      hljs.QUOTE_STRING_MODE,42      hljs.NUMBER_MODE,43      {44        scope: "punctuation",45        match: /[.]{3}/,46        relevance: 047      },48      {49        scope: "punctuation",50        begin: /[\!\(\)\:\=\[\]\{\|\}]{1}/,51        relevance: 052      },53      {54        scope: "variable",55        begin: /\$/,56        end: /\W/,57        excludeEnd: true,58        relevance: 059      },60      {61        scope: "meta",62        match: /@\w+/,63        excludeEnd: true64      },65      {66        scope: "symbol",67        begin: regex.concat(GQL_NAME, regex.lookahead(/\s*:/)),68        relevance: 069      }70    ],71    illegal: [72      /[;<']/,73      /BEGIN/74    ]75  };76}77 78export { graphql as default };79 
basant307/AI_Governance_Project · CoolFace