{"ast":null,"code":"import config from \"../../config\";\nimport fetch from \"node-fetch\";\n\nclass GQLSSRClient {\n async post(query, variables, operationName) {\n const res = await fetch(config.apiUrl(\"/graphql\"), {\n method: \"POST\",\n body: JSON.stringify({\n query,\n variables,\n operationName\n }),\n credentials: \"include\",\n headers: {\n \"Content-Type\": \"application/json\"\n }\n });\n const json = await res.json();\n\n if (json.errors) {\n throw new Error(`${json.errors[0].message} (${json.errors[0].path})`);\n }\n\n return json.data;\n }\n\n}\n\nconst gqlSsrClient = new GQLSSRClient();\nexport default gqlSsrClient;","map":null,"metadata":{},"sourceType":"module"}