{"name":"hapi-graphql","version":"0.2.4","description":"Create a GraphQL HTTP server with Hapi.","author":{"name":"Simon Degraeve","email":"simon.degraeve@gmail.com"},"main":"./lib/index.js","license":"MIT","bugs":{"url":"https://github.com/SimonDegraeve/hapi-graphql/issues"},"repository":{"type":"git","url":"git+ssh://git@github.com/SimonDegraeve/hapi-graphql.git"},"keywords":["hapi","graphql"],"scripts":{"test":"echo \"Error: no test specified\" && exit 1","prebublish":"babel src --out-dir lib"},"devDependencies":{"babel":"^5.8.21","babel-eslint":"^4.0.7","eslint":"^1.1.0","eslint-plugin-babel":"^2.1.0","graphql":"^0.4.2","hapi":"^9.0.2"},"dependencies":{"babel-runtime":"^5.8.20","boom":"^2.8.0","joi":"^6.6.1"},"peerDependencies":{"graphql":"~0.4.2"},"gitHead":"0c7484f113ee78954fa228722cd6724d9addb4e4","homepage":"https://github.com/SimonDegraeve/hapi-graphql#readme","_id":"hapi-graphql@0.2.4","_shasum":"d3011d3cffaf66866663bb2bf4dfbba97dcf9b13","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"simon.degraeve","email":"simon.degraeve@gmail.com"},"maintainers":[{"name":"simon.degraeve","email":"simon.degraeve@gmail.com"}],"dist":{"shasum":"d3011d3cffaf66866663bb2bf4dfbba97dcf9b13","tarball":"http://registry-npm.ywwl.com/hapi-graphql/download/hapi-graphql-0.2.4.tgz","integrity":"sha512-uhWDrfBHloPCGczFs7Lo8ipUINON8hcd5sKsNl+7qjOUVitfOxeWVqC4O7E4SNbZfE5GlQ18bRSyJ2IF48N9MQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCcX1W5HqWt3ADLrmnS/dhWTel0914gK9I443tU40P78wIgcCk8vIn+b0M3uyXbIRYZtJD/egzRxkBJ3RsVb9QtQS8="}],"size":5451,"noattachment":false,"key":"/hapi-graphql/-/hapi-graphql-0.2.4.tgz"},"directories":{},"readme":"# GraphQL Hapi Plugin\n\nCreate a GraphQL HTTP server with [Hapi](http://hapijs.com).\nPort from [express-graphql](https://github.com/graphql/express-graphql).\n\n```js\nnpm install --save hapi-graphql\n```\n\n### Example\n\n```js\nimport Hapi from 'hapi';\nimport GraphQL from 'hapi-graphql';\nimport {GraphQLSchema} from 'graphql';\n\nconst server = new Hapi.Server();\nserver.connection({\n  port: 3000\n});\n\nconst TestSchema = new GraphQLSchema({});\n\nserver.register({\n  register: GraphQL,\n  options: {\n    query: {\n      # options, see below\n    },\n    // OR\n    //\n    // query: (request) => ({\n    //   # options, see below\n    // }),\n    route: {\n      path: '/graphql',\n      config: {}\n    }\n  }\n}, () =>\n  server.start(() =>\n    console.log('Server running at:', server.info.uri)\n  )\n);\n```\n\n### Options\n\nThe `options` key of `query` accepts the following:\n\n  * **`schema`**: A `GraphQLSchema` instance from [`graphql-js`][].\n    A `schema` *must* be provided.\n\n  * **`context`**: A value to pass as the `context` to the `graphql()`\n    function from [`graphql-js`][].\n\n  * **`rootValue`**: A value to pass as the `rootValue` to the `graphql()`\n    function from [`graphql-js`][].\n\n  * **`pretty`**: If `true`, any JSON response will be pretty-printed.\n\n  * **`formatError`**: An optional function which will be used to format any\n    errors produced by fulfilling a GraphQL operation. If no function is\n    provided, GraphQL's default spec-compliant [`formatError`][] function will\n    be used.\n\n  * **`validationRules`**: Optional additional validation rules queries must\n    satisfy in addition to those defined by the GraphQL spec.\n\n  * **`graphiql`**: If `true`, may present [GraphiQL][] when loaded directly\n    from a browser (a useful tool for debugging and exploration).\n\n#### Debugging\n\nDuring development, it's useful to get more information from errors, such as\nstack traces. Providing a function to `formatError` enables this:\n\n```js\nformatError: error => ({\n  message: error.message,\n  locations: error.locations,\n  stack: error.stack\n})\n```\n","publish_time":1441036020023,"_cnpm_publish_time":1441036020023,"dist-tags":{"latest":"1.0.1"}}