<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language>
<!--
  GraphQL: https://graphql.org/
  Synatx: https://github.com/graphql/graphql-spec/blob/master/spec/Section%202%20- -%20Language.md
     and: https://github.com/graphql/graphql-spec/blob/master/spec/Appendix%20B%20- -%20Grammar%20Summary.md
-->
<language name="GraphQL" section="Other" version="3" kateversion="5.0" extensions="*.graphql" author="Volker Krause (vkrause@kde.org)" license="MIT">
  <highlighting>
    <list name="listKeywords">
      <item>enum</item>
      <item>extend</item>
      <item>fragment</item>
      <item>implements</item>
      <item>input</item>
      <item>interface</item>
      <item>mutation</item>
      <item>on</item>
      <item>query</item>
      <item>scalar</item>
      <item>schema</item>
      <item>subscription</item>
      <item>type</item>
      <item>union</item>
    </list>
   <list name="listConstants">
      <item>null</item>
      <item>true</item>
      <item>false</item>
    </list>
    <list name="listTypes">
      <item>Boolean</item>
      <item>Float</item>
      <item>ID</item>
      <item>Int</item>
      <item>String</item>
    </list>

    <contexts>
      <context name="ctxNormal" lineEndContext="#stay" attribute="Normal">
        <DetectChar char="{" beginRegion="RegionBrace"/>
        <DetectChar char="}" endRegion="RegionBrace"/>
        <Float attribute="Float"/>
        <Int attribute="Decimal"/>
        <keyword String="listKeywords" attribute="Keyword"/>
        <keyword String="listConstants" attribute="Constant"/>
        <keyword String="listTypes" attribute="Type"/>
        <StringDetect attribute="String" context="ctxBlockString" String="&quot;&quot;&quot;"/>
        <DetectChar attribute="String" context="ctxString" char="&quot;"/>
        <DetectChar attribute="Comment" context="ctxComment" char="#"/>
        <RegExpr String="\$[_A-Za-z][_0-9A-Za-z]*" attribute="Variable"/>
        <RegExpr String="@[_A-Za-z][_0-9A-Za-z]*" attribute="Directive"/>
      </context>

      <context name="ctxString" attribute="String" lineEndContext="#pop">
        <HlCStringChar attribute="Special Character" context="#stay"/>
        <DetectChar attribute="String" context="#pop" char="&quot;"/>
      </context>
      <context name="ctxBlockString" attribute="String" lineEndContext="#stay">
        <HlCStringChar attribute="Special Character" context="#stay"/>
        <StringDetect attribute="String" context="#pop" String="&quot;&quot;&quot;"/>
      </context>

      <context name="ctxComment" attribute="Comment" lineEndContext="#pop">
        <DetectSpaces />
        <IncludeRules context="##Comments"/>
      </context>
    </contexts>

    <itemDatas>
      <itemData name="Normal" defStyleNum="dsNormal" spellChecking="false"/>
      <itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false"/>
      <itemData name="Variable" defStyleNum="dsVariable" spellChecking="false"/>
      <itemData name="Decimal" defStyleNum="dsDecVal"/>
      <itemData name="Float" defStyleNum="dsFloat"/>
      <itemData name="String" defStyleNum="dsString"/>
      <itemData name="Special Character" defStyleNum="dsChar" spellChecking="false"/>
      <itemData name="Constant" defStyleNum="dsConstant" spellChecking="false"/>
      <itemData name="Type" defStyleNum="dsDataType" spellChecking="false"/>
      <itemData name="Directive" defStyleNum="dsAttribute" spellChecking="false"/>
      <itemData name="Comment" defStyleNum="dsComment"/>
    </itemDatas>
  </highlighting>
  <general>
    <comments>
      <comment name="singleLine" start="#"/>
    </comments>
  </general>
</language>
<!-- kate: replace-tabs on; tab-width 2; indent-width 2; -->
