{"name":"hapi-graphql","version":"1.0.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":"eslint src","prepublish":"rm -rf lib/* && babel src --out-dir lib"},"devDependencies":{"babel-cli":"^6.10.1","babel-eslint":"^6.1.0","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-runtime":"^6.9.0","babel-preset-es2015":"^6.9.0","babel-preset-stage-2":"^6.11.0","babel-runtime":"^6.9.2","eslint":"^3.0.1","eslint-config-airbnb-base":"^4.0.0","eslint-plugin-import":"^1.10.2","graphql":"^0.6.0","hapi":"^13.5.0"},"dependencies":{"accepts":"^1.3.3","babel-runtime":"^5.8.33","boom":"^3.2.2","joi":"^8.4.2"},"peerDependencies":{"babel-runtime":"^6.9.2","graphql":"^0.6.0"},"eslintConfig":{"parser":"babel-eslint","extends":["airbnb-base"]},"babel":{"presets":["es2015","stage-2"],"plugins":["add-module-exports","transform-runtime"]},"gitHead":"da0e62a3e6d49a12bdb9d911ba7a256a44dfed52","homepage":"https://github.com/SimonDegraeve/hapi-graphql#readme","_id":"hapi-graphql@1.0.0","_shasum":"ea6e1bb544bc6b8c28ee81ea3117ebc56575cc59","_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":"ea6e1bb544bc6b8c28ee81ea3117ebc56575cc59","tarball":"http://registry-npm.ywwl.com/hapi-graphql/download/hapi-graphql-1.0.0.tgz","integrity":"sha512-DAKGFesUEXBitSSCv8pBelpMhh5C4dKqQtrYU2AqaNUKChgVtbq34bDEjxBWjVRuyVjijU8L1He4JCt3VWLl0g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA+rn9DZKVeOfU7SrWLkXZIAvScBvmL5OSv8DikQpdG5AiEAmzu5J8mZz8On8wpPZ2gIXW4fZ5HaKA15wU13+3x6W3g="}],"size":7128,"noattachment":false,"key":"/hapi-graphql/-/hapi-graphql-1.0.0.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/hapi-graphql-1.0.0.tgz_1467780520548_0.5175332364160568"},"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":1467780520936,"_cnpm_publish_time":1467780520936,"dist-tags":{"latest":"1.0.1"}}