{"id":15975720,"url":"https://github.com/youssef-ahamid/apollo-logging-plugin","last_synced_at":"2025-04-04T17:13:53.741Z","repository":{"id":144719075,"uuid":"614984328","full_name":"youssef-ahamid/apollo-logging-plugin","owner":"youssef-ahamid","description":"Colorful Logs for your Apollo GraphQL server","archived":false,"fork":false,"pushed_at":"2023-03-16T22:43:19.000Z","size":59,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-10T20:18:06.827Z","etag":null,"topics":["apollo","apollo-server","apollo-server-express","log","logger","logging","typescript","typescript-library"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/youssef-ahamid.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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":"2023-03-16T18:00:00.000Z","updated_at":"2023-03-17T13:34:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"f5872406-db82-409c-8fc5-2591269fe35e","html_url":"https://github.com/youssef-ahamid/apollo-logging-plugin","commit_stats":{"total_commits":6,"total_committers":2,"mean_commits":3.0,"dds":"0.16666666666666663","last_synced_commit":"e31af4bf99c17037764ba687641656186b9ad6f1"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":"youssef-ahamid/ts-lib-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youssef-ahamid%2Fapollo-logging-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youssef-ahamid%2Fapollo-logging-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youssef-ahamid%2Fapollo-logging-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/youssef-ahamid%2Fapollo-logging-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/youssef-ahamid","download_url":"https://codeload.github.com/youssef-ahamid/apollo-logging-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247217221,"owners_count":20903009,"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":["apollo","apollo-server","apollo-server-express","log","logger","logging","typescript","typescript-library"],"created_at":"2024-10-07T22:04:48.878Z","updated_at":"2025-04-04T17:13:53.719Z","avatar_url":"https://github.com/youssef-ahamid.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Apollo Logging Plugin\n\nAdds colorful logs to your Apollo Server.\n\n## Installation\n\n```bash\nnpm i apollo-logging-plugin #npm\nyarn add apollo-logging-plugin #yarn\npnpm add apollo-logging-plugin #pnpm\n```\n\n## Usage\n\n```typescript\nimport { ApolloServer, BaseContext } from '@apollo/server';\nimport { ApolloLogPlugin } from 'apollo-logging-plugin';\n\nconst server = new ApolloServer\u003cBaseContext\u003e({\n  typeDefs,\n  resolvers,\n  plugins: [ApolloLogPlugin()]\n});\n```\n\n### Custom [handlers](https://www.apollographql.com/docs/apollo-server/integrations/plugins/#responding-to-events)\n\n```typescript\nimport { ApolloServer, BaseContext } from '@apollo/server';\nimport { ApolloLogPlugin } from 'apollo-logging-plugin';\n\nconst handlers = (log: Log) =\u003e ({\n  didEncounterErrors: log.error,\n  didResolveOperation: log.info,\n  didEncounterSubsequentErrors: (context) =\u003e\n    log.error(context, 'Custom Message'),\n  parsingDidStart: (context) =\u003e {\n    // handle event\n  }\n  // ... other handlers\n});\n\nconst server = new ApolloServer\u003cBaseContext\u003e({\n  typeDefs,\n  resolvers,\n  plugins: [ApolloLogPlugin(handlers)]\n});\n```\n\n\u003e This is a typescript library built with `ts-lib-starter`. [Build yours now -\u003e]('https://github.com/youssef-ahamid/ts-lib-starter/')\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoussef-ahamid%2Fapollo-logging-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoussef-ahamid%2Fapollo-logging-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoussef-ahamid%2Fapollo-logging-plugin/lists"}