{"name":"hapi-graphql","version":"0.5.0","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","prepublish":"babel src --out-dir lib"},"devDependencies":{"babel":"^5.8.33","babel-eslint":"^4.1.6","eslint":"^1.10.3","eslint-plugin-babel":"^3.0.0","graphql":"^0.4.14","hapi":"^11.1.2"},"dependencies":{"accepts":"^1.3.1","babel-runtime":"^5.8.33","boom":"^3.0.0","joi":"^7.0.1"},"peerDependencies":{"graphql":"^0.4.14"},"gitHead":"d1f7aca9199f4c179ac010251b6af55274fbc220","homepage":"https://github.com/SimonDegraeve/hapi-graphql#readme","_id":"hapi-graphql@0.5.0","_shasum":"e1919d3f2cd770741af8bb9e620280616dc67531","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.1","_npmUser":{"name":"simon.degraeve","email":"simon.degraeve@gmail.com"},"maintainers":[{"name":"simon.degraeve","email":"simon.degraeve@gmail.com"}],"dist":{"shasum":"e1919d3f2cd770741af8bb9e620280616dc67531","tarball":"http://registry-npm.ywwl.com/hapi-graphql/download/hapi-graphql-0.5.0.tgz","integrity":"sha512-CJzevVjCqqjf5dy9DoFv8VhY5eKQeXUK7IsnTibr+UWWbch6GTvnwe+zUgpfT6ha2uWCndd3jcoC5aAayBJ/+w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD1V2FnEN+zYqmSQ0o0SQu6Jnl2/7xfr8EdlcMlGyvblgIhAL5VWuE0QOxdqhlIngmRyqzVdYHokZJYRogXq0M5UzgW"}],"size":9113,"noattachment":false,"key":"/hapi-graphql/-/hapi-graphql-0.5.0.tgz"},"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/hapi-graphql-0.5.0.tgz_1467772014790_0.3577581071294844"},"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":1467772018547,"_cnpm_publish_time":1467772018547,"dist-tags":{"latest":"1.0.1"}}