{"name":"relay-runtime","version":"0.0.0-main-5f826670","keywords":["graphql","relay"],"license":"MIT","_id":"relay-runtime@0.0.0-main-5f826670","maintainers":[{"name":"alunyov","email":"alunyov@fb.com"},{"name":"sugarpirate","email":"arr@sugarpirate.com"},{"name":"fb","email":"opensource+npm@fb.com"},{"name":"yuzhi","email":"yuzhi.z@gmail.com"},{"name":"kassens","email":"jkassens@fb.com"},{"name":"xiaobu","email":"yaotianyu0512@gmail.com"},{"name":"relay-bot","email":"react-core+relay@meta.com"}],"homepage":"https://relay.dev","bugs":{"url":"https://github.com/facebook/relay/issues"},"dist":{"shasum":"80944f4d4cf5d1fcbf43c16c8d5d2dcf5c29009d","tarball":"http://registry-npm.ywwl.com/relay-runtime/download/relay-runtime-0.0.0-main-5f826670.tgz","fileCount":241,"integrity":"sha512-7zoyoD4aKuMskBn6sor/Ro6gB5jJ+4JdEEKPNqAtHtyGtb2zBxmaBE4MtPlojaAoicwxdwP+5H2IlKChCfinEQ==","signatures":[{"sig":"MEQCIAqrIYk/MsHyNrh/HzM5k5+lWa3w9lr0slkxKXzZUTciAiAr2hApj7h0CdMZOwfJgfZHnlw43/WAnyoz03nEVy772A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":1649724,"size":354822,"noattachment":false,"key":"/relay-runtime/-/relay-runtime-0.0.0-main-5f826670.tgz"},"main":"index.js","readme":"## Relay Runtime\n\nA set of Relay APIs responsible for data fetching, reading and normalization of\nthe GraphQL data.\n\nExample:\n\n```js\n// @flow strict-local\n\nimport type {FetchFunction} from 'relay-runtime';\n\nconst {\n  Environment,\n  Network,\n  Observable,\n  RecordSource,\n  Store,\n  fetchQuery,\n  graphql,\n} = require('relay-runtime');\n\nconst fetchFn: FetchFunction = function (request, variables) {\n  return new Observable.create(source => {\n    fetch('/my-graphql-api', {\n      method: 'POST',\n      body: JSON.stringify({\n        text: request.text,\n        variables,\n      }),\n    })\n      .then(response => response.json())\n      .then(data => source.next(data));\n  });\n};\n\nconst network = Network.create(fetchFn);\nconst store = new Store(new RecordSource());\nconst environment = new Environment({\n  network,\n  store,\n});\n\nfetchQuery(\n  environment,\n  graphql`\n    query AppQuery($id: ID!) {\n      user(id: $id) {\n        name\n      }\n    }\n  `,\n  {id: 'my-node-id'},\n).subscribe({\n  error: error => {\n    console.error(error);\n  },\n  next: data => {\n    console.log(data);\n  },\n});\n```\n\nFor complete API reference, visit https://relay.dev/.\n","_npmUser":{"name":"relay-bot","email":"react-core+relay@meta.com"},"repository":{"url":"git+https://github.com/facebook/relay.git","type":"git","directory":"packages/relay-runtime"},"_npmVersion":"6.14.18","description":"A core runtime for building GraphQL-driven applications.","directories":{"":"./"},"_nodeVersion":"14.21.3","dependencies":{"fbjs":"^3.0.2","invariant":"^2.2.4","@babel/runtime":"^7.0.0"},"_hasShrinkwrap":false,"haste_commonjs":true,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/relay-runtime_0.0.0-main-5f826670_1718107897311_0.6622412757637972","host":"s3://npm-registry-packages"},"publish_time":1718107897499,"_cnpm_publish_time":1718107897499,"dist-tags":{"dev":"13.0.0-rc.2","latest":"21.0.1","main":"0.0.0-main-b9e1c520"}}