{"id":15814293,"url":"https://github.com/mateusmaso/graphql-jay-hyperschema","last_synced_at":"2026-07-08T14:31:18.584Z","repository":{"id":57253492,"uuid":"67755038","full_name":"mateusmaso/graphql-jay-hyperschema","owner":"mateusmaso","description":"GraphQL Jay adapter for JSON Hyper-Schema (draft-04) ","archived":false,"fork":false,"pushed_at":"2017-01-05T23:07:23.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-22T15:50:05.205Z","etag":null,"topics":["graphql-jay","javascript","json-hyper-schema"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mateusmaso.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-09T01:42:09.000Z","updated_at":"2016-12-30T19:20:08.000Z","dependencies_parsed_at":"2022-08-31T22:11:59.670Z","dependency_job_id":null,"html_url":"https://github.com/mateusmaso/graphql-jay-hyperschema","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateusmaso%2Fgraphql-jay-hyperschema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateusmaso%2Fgraphql-jay-hyperschema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateusmaso%2Fgraphql-jay-hyperschema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateusmaso%2Fgraphql-jay-hyperschema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mateusmaso","download_url":"https://codeload.github.com/mateusmaso/graphql-jay-hyperschema/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246574859,"owners_count":20799221,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graphql-jay","javascript","json-hyper-schema"],"created_at":"2024-10-05T04:24:06.621Z","updated_at":"2026-07-08T14:31:18.578Z","avatar_url":"https://github.com/mateusmaso.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# graphql-jay-hyperschema [![Build Status](https://travis-ci.org/mateusmaso/graphql-jay-hyperschema.svg?branch=master)](https://travis-ci.org/mateusmaso/graphql-jay-hyperschema)\n\nGraphQL Jay adapter for JSON Hyper-Schema (draft-04)\n\n## Install\n\n```\n$ npm install --save graphql-jay-hyperschema\n```\n\n## Usage\n\n```javascript\nimport {adapter} from \"graphql-jay-hyperschema\"\n\nvar url = \"http://myservice.com/api/v1\"\n\nexport default function service() {  \n  var metadata = {\n    \"$schema\": \"http://json-schema.org/draft-04/hyper-schema#\",\n    \"type\": \"object\",\n    \"definitions\": {\n      \"user\": {\n        \"type\": \"object\",\n        \"properties\": {...},\n        \"required\": [...],\n        \"links\": [...]\n      }\n    },\n    \"properties\": {\n      \"user\": {\n        \"$ref\": \"#/definitions/user\"\n      }\n    },\n    \"links\": [{\n      \"rel\": \"user\",\n      \"href\": \"/users/{id}\",\n      \"schema\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"id\": {\n            \"type\": \"number\"\n          }\n        },\n        \"required\": [\"id\"]\n      },\n      \"targetSchema\": {\n        \"$ref\": \"#/definitions/user\"\n      }\n    }]\n  }\n\n  return {\n    url,\n    metadata,\n    adapter\n  }\n}\n```\n\n## ```LDO``` extra properties\n\n**each**\n\nUse to resolve relations with an unique ```href``` for each item from a target field.\n\n```json\n{\n  \"rel\": \"urls\",\n  \"href\": \"{+item}\",\n  \"each\": \"urls\"\n}\n```\n\n**linkRel**\n\nUse to relate to another ```LDO``` based on ```schema``` values.\n\n```json\n{\n  \"rel\": \"tatooine\",\n  \"linkRel\": {\n    \"id\": \"planetWithId\",\n    \"values\": {\n      \"id\": \"1\"\n    }\n  }\n}\n```\n\n## License\n\nMIT © [Mateus Maso](http://www.mateusmaso.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmateusmaso%2Fgraphql-jay-hyperschema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmateusmaso%2Fgraphql-jay-hyperschema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmateusmaso%2Fgraphql-jay-hyperschema/lists"}