diff --git a/composer.json b/composer.json
index a82125110c168e8c1620f5a7ec212eaef32e3461..1287a32669d41e4683cec684bc4e5fe9f54c3009 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,8 @@
 {
     "require": {
         "aws/aws-sdk-php": "^3.181",
-        "guzzlehttp/guzzle": "^7.0"
+        "guzzlehttp/guzzle": "^7.0",
+        "webonyx/graphql-php": "^14.11"
     },
     "config": {
         "vendor-dir": "public/API/vendor"
diff --git a/composer.lock b/composer.lock
index 6cc263e80a97fab7d510f732f44bdc5bd327f6f1..cea0c4628a65177f7e2af0acb5dba364620385ef 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "f47a9b8d286ca72493a7fe02f263976e",
+    "content-hash": "31a3a0321659f9c8afff63a68a9fafb6",
     "packages": [
         {
             "name": "aws/aws-crt-php",
@@ -669,6 +669,72 @@
                 }
             ],
             "time": "2021-05-27T12:26:48+00:00"
+        },
+        {
+            "name": "webonyx/graphql-php",
+            "version": "v14.11.5",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/webonyx/graphql-php.git",
+                "reference": "ffa431c0821821839370a68dab3c2597c06bf7f0"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/webonyx/graphql-php/zipball/ffa431c0821821839370a68dab3c2597c06bf7f0",
+                "reference": "ffa431c0821821839370a68dab3c2597c06bf7f0",
+                "shasum": ""
+            },
+            "require": {
+                "ext-json": "*",
+                "ext-mbstring": "*",
+                "php": "^7.1 || ^8"
+            },
+            "require-dev": {
+                "amphp/amp": "^2.3",
+                "doctrine/coding-standard": "^6.0",
+                "nyholm/psr7": "^1.2",
+                "phpbench/phpbench": "^1.2",
+                "phpstan/extension-installer": "^1.0",
+                "phpstan/phpstan": "0.12.82",
+                "phpstan/phpstan-phpunit": "0.12.18",
+                "phpstan/phpstan-strict-rules": "0.12.9",
+                "phpunit/phpunit": "^7.2 || ^8.5",
+                "psr/http-message": "^1.0",
+                "react/promise": "2.*",
+                "simpod/php-coveralls-mirror": "^3.0",
+                "squizlabs/php_codesniffer": "3.5.4"
+            },
+            "suggest": {
+                "psr/http-message": "To use standard GraphQL server",
+                "react/promise": "To leverage async resolving on React PHP platform"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "GraphQL\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "description": "A PHP port of GraphQL reference implementation",
+            "homepage": "https://github.com/webonyx/graphql-php",
+            "keywords": [
+                "api",
+                "graphql"
+            ],
+            "support": {
+                "issues": "https://github.com/webonyx/graphql-php/issues",
+                "source": "https://github.com/webonyx/graphql-php/tree/v14.11.5"
+            },
+            "funding": [
+                {
+                    "url": "https://opencollective.com/webonyx-graphql-php",
+                    "type": "open_collective"
+                }
+            ],
+            "time": "2022-01-24T11:13:31+00:00"
         }
     ],
     "packages-dev": [],
@@ -679,5 +745,5 @@
     "prefer-lowest": false,
     "platform": [],
     "platform-dev": [],
-    "plugin-api-version": "2.1.0"
+    "plugin-api-version": "2.0.0"
 }
diff --git a/js/customElements/contactMailButton.js b/js/customElements/contactMailButton.js
index 646110d8b2ad69bb1e9a397f6530f5bdafab839e..d82cdbc7e25e9dfc84eb12c17b9b263019c9c29e 100644
--- a/js/customElements/contactMailButton.js
+++ b/js/customElements/contactMailButton.js
@@ -6,7 +6,15 @@ class contactMailButton extends HTMLElement {
     }
 
     async addButton() {
-        let sitekey = await (await fetch("/API/config.php?name=sitekey")).text();
+        var graphql = JSON.stringify({
+            query: "query {\r\n  sitekey\r\n}"
+          })
+          var requestOptions = {
+            method: 'POST',
+            body: graphql,
+          };
+
+        let sitekey = (await (await fetch("/API/graphql.php", requestOptions)).json()).data.sitekey;
         console.log(sitekey);
         this.innerHTML = `E-Mail: <button id="emailButton" class="h-captcha" data-sitekey="${sitekey}" data-callback="onSubmit">laden</button><br>`;
         const script = document.createElement("script");
diff --git a/public/API/config.php b/public/API/config.php
deleted file mode 100644
index 336fdbd8d55bfecd9718ba2aedb017eb4cfcee07..0000000000000000000000000000000000000000
--- a/public/API/config.php
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php
-require "./lib/config.php";
-
-$configValue = $_GET['name'];
-
-switch ($configValue){
-    case "sitekey":
-        echo($sitekey);
-        break;
-    default:
-        echo("notFound");
-}
diff --git a/public/API/graphql.php b/public/API/graphql.php
new file mode 100644
index 0000000000000000000000000000000000000000..e7d7e59b34c227f6f8edd9561c69cc791fa83731
--- /dev/null
+++ b/public/API/graphql.php
@@ -0,0 +1,33 @@
+<?php
+use GraphQL\GraphQL;
+use GraphQL\Type\Schema;
+
+require 'vendor/autoload.php';
+require "./lib/config.php";
+require "./lib/mysql.php";
+require "./queries/queries.php";
+
+$schema = new Schema([
+    'query' => $queryType
+]);
+
+$rawInput = file_get_contents('php://input');
+$input = json_decode($rawInput, true);
+$query = $input['query'];
+$variableValues = isset($input['variables']) ? $input['variables'] : null;
+
+try {
+    $rootValue = [];
+    $result = GraphQL::executeQuery($schema, $query, $rootValue, null, $variableValues);
+    $output = $result->toArray();
+} catch (\Exception $e) {
+    $output = [
+        'errors' => [
+            [
+                'message' => $e->getMessage()
+            ]
+        ]
+    ];
+}
+header('Content-Type: application/json');
+echo json_encode($output);
\ No newline at end of file
diff --git a/public/API/queries/queries.php b/public/API/queries/queries.php
new file mode 100644
index 0000000000000000000000000000000000000000..cc147c02aef7335c4923974d2af32837a4c7afac
--- /dev/null
+++ b/public/API/queries/queries.php
@@ -0,0 +1,13 @@
+<?php
+use GraphQL\Type\Definition\ObjectType;
+use GraphQL\Type\Definition\Type;
+
+$queryType = new ObjectType([
+    'name' => 'Query',
+    'fields' => [
+        'sitekey' => [
+            'type' => Type::string(),
+            'resolve' => fn ($rootValue, $args) => $sitekey,
+        ],
+    ],
+]);