{"action":"created","issue":{"url":"https://api.github.com/repos/graphql-java/graphql-java/issues/183","repository_url":"https://api.github.com/repos/graphql-java/graphql-java","labels_url":"https://api.github.com/repos/graphql-java/graphql-java/issues/183/labels{/name}","comments_url":"https://api.github.com/repos/graphql-java/graphql-java/issues/183/comments","events_url":"https://api.github.com/repos/graphql-java/graphql-java/issues/183/events","html_url":"https://github.com/graphql-java/graphql-java/issues/183","id":168460627,"number":183,"title":"Metadata support for schema type definitions","user":{"login":"aschrijver","id":5111931,"avatar_url":"https://avatars.githubusercontent.com/u/5111931?v=3","gravatar_id":"","url":"https://api.github.com/users/aschrijver","html_url":"https://github.com/aschrijver","followers_url":"https://api.github.com/users/aschrijver/followers","following_url":"https://api.github.com/users/aschrijver/following{/other_user}","gists_url":"https://api.github.com/users/aschrijver/gists{/gist_id}","starred_url":"https://api.github.com/users/aschrijver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aschrijver/subscriptions","organizations_url":"https://api.github.com/users/aschrijver/orgs","repos_url":"https://api.github.com/users/aschrijver/repos","events_url":"https://api.github.com/users/aschrijver/events{/privacy}","received_events_url":"https://api.github.com/users/aschrijver/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/graphql-java/graphql-java/labels/wontfix","name":"wontfix","color":"ffffff"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-30T10:19:25Z","updated_at":"2016-08-17T15:41:29Z","closed_at":"2016-08-17T15:41:29Z","body":"As far as I see there is currently no support to add metadata to a schema definition.\r\nHaving a means to specify metadata on the various objects in `graphql.schema` package would allow additional server-side processing logic to be based on it.\r\n\r\nI would like to propose adding `Builder.metadata(String, Object)` and `Builder.metadata(Map<String, Object> metadata)` methods to the various builder classes (and constructors), and having it available in data fetchers and type resolvers.\r\n\r\n(Maybe instead of a `Map<String, Object>` the metadata could also be defined as a custom GraphQL introspection type `__METADATA`)"},"comment":{"url":"https://api.github.com/repos/graphql-java/graphql-java/issues/comments/240453229","html_url":"https://github.com/graphql-java/graphql-java/issues/183#issuecomment-240453229","issue_url":"https://api.github.com/repos/graphql-java/graphql-java/issues/183","id":240453229,"user":{"login":"dminkovsky","id":218725,"avatar_url":"https://avatars.githubusercontent.com/u/218725?v=3","gravatar_id":"","url":"https://api.github.com/users/dminkovsky","html_url":"https://github.com/dminkovsky","followers_url":"https://api.github.com/users/dminkovsky/followers","following_url":"https://api.github.com/users/dminkovsky/following{/other_user}","gists_url":"https://api.github.com/users/dminkovsky/gists{/gist_id}","starred_url":"https://api.github.com/users/dminkovsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dminkovsky/subscriptions","organizations_url":"https://api.github.com/users/dminkovsky/orgs","repos_url":"https://api.github.com/users/dminkovsky/repos","events_url":"https://api.github.com/users/dminkovsky/events{/privacy}","received_events_url":"https://api.github.com/users/dminkovsky/received_events","type":"User","site_admin":false},"created_at":"2016-08-17T15:41:29Z","updated_at":"2016-08-17T15:41:29Z","body":"This is interesting and seems harmless enough. Except I am unaware of such functionality in any other implementation. That said, I only follow the JS implementation, so please let me know if I am wrong. A goal of this implementation is to follow the spec and to also be as familiar as possible to people coming from other implementations. \r\n\r\nFurthermore, a work-around for the absence of this feature exists: one can (ab)use the `description` property to store metadata. You might have to employ serialization/deserialization if your metadata is structured. But still, at this time, I think `description` fits the bill sufficiently for metadata.\r\n\r\nSo I am closing this for now to possibly revisit later."}}
{"actor":{"display_login":"dminkovsky"}}