{"name":"hapi-graphql","version":"0.2.1","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.5","eslint":"^1.1.0","eslint-plugin-babel":"^2.0.0","graphql":"^0.4.2","hapi":"^9.0.1"},"dependencies":{"babel-runtime":"^5.8.20","boom":"^2.8.0","joi":"^6.6.1"},"peerDependencies":{"graphql":"~0.4.2"},"gitHead":"a7456e1f1b4c49a97cc4da475a2801f9946314a9","homepage":"https://github.com/SimonDegraeve/hapi-graphql#readme","_id":"hapi-graphql@0.2.1","_shasum":"f2b99b338835fbf9c35fd73d977c911be931b97b","_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":"f2b99b338835fbf9c35fd73d977c911be931b97b","tarball":"http://registry-npm.ywwl.com/hapi-graphql/download/hapi-graphql-0.2.1.tgz","integrity":"sha512-fd+VZda2fQYkm+zeFARQGfRvvch9Miue7YeOtzKLWhAuANwGvyCkgz/4sn6OzpG2G/bI6F4LKQnYZJXb9l/7zQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD8EtmvHnJzuUxBOMARDIytd6ryt+8M2Njk3MKidkt/qgIhAMAFyX6BQGDrV1v9fQDg4QgoIODxdhSQXGrbw8HUbEz8"}],"size":7964,"noattachment":false,"key":"/hapi-graphql/-/hapi-graphql-0.2.1.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":1439706784692,"_cnpm_publish_time":1439706784692,"dist-tags":{"latest":"1.0.1"}}