{"id":15292812,"url":"https://github.com/taylorgoolsby/graphql-directive-private","last_synced_at":"2025-04-13T11:33:38.992Z","repository":{"id":38325438,"uuid":"158467471","full_name":"taylorgoolsby/graphql-directive-private","owner":"taylorgoolsby","description":"Fields and Objects marked with @private will not be exposed through the GraphQL API.","archived":false,"fork":false,"pushed_at":"2023-07-05T01:50:25.000Z","size":271,"stargazers_count":3,"open_issues_count":14,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T15:04:32.641Z","etag":null,"topics":["cut","directive","field","graphql","hide","private","remove","schema","sdl"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"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/taylorgoolsby.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-21T00:15:02.000Z","updated_at":"2023-08-25T13:24:55.000Z","dependencies_parsed_at":"2025-02-15T20:49:48.296Z","dependency_job_id":"0967299c-0cb9-4257-b2c3-072b6f023a92","html_url":"https://github.com/taylorgoolsby/graphql-directive-private","commit_stats":null,"previous_names":["taylrun/graphql-directive-private","taylorgoolsby/graphql-directive-private","mgs485/graphql-directive-private"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taylorgoolsby%2Fgraphql-directive-private","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taylorgoolsby%2Fgraphql-directive-private/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taylorgoolsby%2Fgraphql-directive-private/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/taylorgoolsby%2Fgraphql-directive-private/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/taylorgoolsby","download_url":"https://codeload.github.com/taylorgoolsby/graphql-directive-private/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248706217,"owners_count":21148666,"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":["cut","directive","field","graphql","hide","private","remove","schema","sdl"],"created_at":"2024-09-30T16:27:29.505Z","updated_at":"2025-04-13T11:33:38.950Z","avatar_url":"https://github.com/taylorgoolsby.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# graphql-directive-private\n\nFields and Objects marked with @private will be removed from the schema. They will not appear in introspection and they will not be queryable.\n\n## Example\n\n```js\nimport privateDirective from 'graphql-directive-private'\n\nconst { privateDirectiveTransform } = privateDirective('private')\n\nconst typeDefs = `\n  directive @private on OBJECT | FIELD_DEFINITION\n\n  type User @private {\n    userId: Int\n    post: Post\n  }\n\n  type Post {\n    postId: Int @private\n    user: User\n  }\n\n  type Query {\n    user: User\n    post: Post\n  }\n  `\n\nlet schema = makeExecutableSchema({\n  typeDefs\n})\n\nschema = privateDirectiveTransform(schema)\n\nconst query = `\n  query {\n    user {\n      userId\n      post {\n        postId\n      }\n    }\n    post {\n      postId\n      user {\n        userId\n      }\n    }\n  }\n`\nconst response = await execute(schema, query)\n// response == { data: { post: { postId: null } } }\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaylorgoolsby%2Fgraphql-directive-private","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaylorgoolsby%2Fgraphql-directive-private","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaylorgoolsby%2Fgraphql-directive-private/lists"}