'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = {
  name: 'graphqlclient',
  language: 'Python',
  prismLanguage: 'python',
  options: [],
  generate: function generate(_ref) {
    var serverUrl = _ref.serverUrl,
        operation = _ref.operation,
        headers = _ref.headers,
        variables = _ref.variables;
    return '\nfrom graphqlclient import GraphQLClient\n\nserverUrl = \'' + serverUrl + '\'\nclient = GraphQLClient(serverUrl)\n\n' + Object.keys(headers).map(function (header) {
      return "client.inject_token('" + headers[header] + "', '" + header + "')";
    }).filter(Boolean) + '\n\ndata = client.execute(\'\'\'\n' + operation + '\n\'\'\', ' + JSON.stringify(variables, null, 2) + ')\n\nprint(data)\n';
  }
};