{"name":"hapi-graphql","version":"0.2.6","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.23","babel-eslint":"^4.1.1","eslint":"^1.3.1","eslint-plugin-babel":"^2.1.1","graphql":"^0.4.2","hapi":"^9.0.3"},"dependencies":{"babel-runtime":"^5.8.20","boom":"^2.8.0","joi":"^6.6.1"},"peerDependencies":{"graphql":"~0.4.2"},"gitHead":"3574354de1cf8498eb622f785d5d89bb21478ce5","homepage":"https://github.com/SimonDegraeve/hapi-graphql#readme","_id":"hapi-graphql@0.2.6","_shasum":"7b48c5c76747ffaba854f669dff7856551e102ac","_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":"7b48c5c76747ffaba854f669dff7856551e102ac","tarball":"http://registry-npm.ywwl.com/hapi-graphql/download/hapi-graphql-0.2.6.tgz","integrity":"sha512-C7beqssrubnXAJdhLUk88knXtnJcokUvzRXO+e7Cpjgq78rmIbrSzYoE+s1AiPa1sqjJXre2RZSTPqaT/TUFow==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC2SUYaXYchI/POCSB9kJb2B53drHV9KHbkPrgXMailfgIhAOrLZNTV8qlYh38s8xq2gCdnVaNaC/RRiuuBg7S4ZCAW"}],"size":7496,"noattachment":false,"key":"/hapi-graphql/-/hapi-graphql-0.2.6.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":1441078007501,"_cnpm_publish_time":1441078007501,"dist-tags":{"latest":"1.0.1"}}