{"id":22477112,"url":"https://github.com/schamane/grapqhl-defs","last_synced_at":"2026-05-17T06:37:21.062Z","repository":{"id":44464068,"uuid":"401462664","full_name":"schamane/grapqhl-defs","owner":"schamane","description":"Definitions for graphql schemas","archived":false,"fork":false,"pushed_at":"2022-07-11T10:54:47.000Z","size":892,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-01T03:33:10.841Z","etag":null,"topics":["definitions","grapqhl","npmjs","schema"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/schamane.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-30T19:28:26.000Z","updated_at":"2023-09-08T18:25:59.000Z","dependencies_parsed_at":"2022-09-19T02:31:27.664Z","dependency_job_id":null,"html_url":"https://github.com/schamane/grapqhl-defs","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schamane%2Fgrapqhl-defs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schamane%2Fgrapqhl-defs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schamane%2Fgrapqhl-defs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schamane%2Fgrapqhl-defs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schamane","download_url":"https://codeload.github.com/schamane/grapqhl-defs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245897297,"owners_count":20690455,"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":["definitions","grapqhl","npmjs","schema"],"created_at":"2024-12-06T14:09:33.057Z","updated_at":"2025-10-16T08:53:49.254Z","avatar_url":"https://github.com/schamane.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Graphql Defs\n\n## Use schema definitions\n\nAdd package to your project dependancies\n\n```bash\nnpm i @schamane/graphql-defs\n```\n\nAdd exports to your shema index.ts\n\n```typescript\nexport { SorterScalarSchema, FilterScalarSchema, FilterValueScalarSchema } from '@schamane/graphql-defs';\n```\n\n## Example\n\nUse Filters and Sorters with Query\n\n```grapqhl\nextend type Query {\n    testFilters(filters: [Filter], sort: Sorter): [FilterEntity]!\n}\n```\n\nUse it in your resolver implementation\n\n```typescript\nimport { defaultSorter, Filter, Sorter } from '@schamane/graphql-defs';\n\nlist(filters: Filter[], sort: Sorter): FilterEntity[] {\n    console.log(filters, sort);\n    if (sort) {\n      console.log('do sort', defaultSorter(this.data, sort));\n      return defaultSorter(this.data, sort);\n    }\n    return this.data;\n  }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschamane%2Fgrapqhl-defs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschamane%2Fgrapqhl-defs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschamane%2Fgrapqhl-defs/lists"}