{"action":"created","issue":{"url":"https://api.github.com/repos/graphql/graphql-js/issues/937","repository_url":"https://api.github.com/repos/graphql/graphql-js","labels_url":"https://api.github.com/repos/graphql/graphql-js/issues/937/labels{/name}","comments_url":"https://api.github.com/repos/graphql/graphql-js/issues/937/comments","events_url":"https://api.github.com/repos/graphql/graphql-js/issues/937/events","html_url":"https://github.com/graphql/graphql-js/issues/937","id":240146967,"node_id":"MDU6SXNzdWUyNDAxNDY5Njc=","number":937,"title":"Allow defining empty types","user":{"login":"vladshcherbin","id":6711845,"node_id":"MDQ6VXNlcjY3MTE4NDU=","avatar_url":"https://avatars1.githubusercontent.com/u/6711845?v=4","gravatar_id":"","url":"https://api.github.com/users/vladshcherbin","html_url":"https://github.com/vladshcherbin","followers_url":"https://api.github.com/users/vladshcherbin/followers","following_url":"https://api.github.com/users/vladshcherbin/following{/other_user}","gists_url":"https://api.github.com/users/vladshcherbin/gists{/gist_id}","starred_url":"https://api.github.com/users/vladshcherbin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladshcherbin/subscriptions","organizations_url":"https://api.github.com/users/vladshcherbin/orgs","repos_url":"https://api.github.com/users/vladshcherbin/repos","events_url":"https://api.github.com/users/vladshcherbin/events{/privacy}","received_events_url":"https://api.github.com/users/vladshcherbin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2017-07-03T11:37:59Z","updated_at":"2018-10-24T22:57:51Z","closed_at":"2017-12-07T07:40:30Z","author_association":"NONE","body":"Currently this is not possible:\r\n\r\n```graphql\r\ntype Mutation {}\r\n\r\nextend type Mutation {\r\n  createPermission(input: CreatePermissionInput!): Permission\r\n}\r\n```\r\n\r\nIt's needed when you want to split your schema into multiple files. Instead, you need to define at least one field:\r\n\r\n```graphql\r\ntype Mutation {\r\n  dummyNotNeededMutationHere(): Smth\r\n}\r\n```\r\n\r\nIt would be awesome to be able to define empty types to later extend them."},"comment":{"url":"https://api.github.com/repos/graphql/graphql-js/issues/comments/432856219","html_url":"https://github.com/graphql/graphql-js/issues/937#issuecomment-432856219","issue_url":"https://api.github.com/repos/graphql/graphql-js/issues/937","id":432856219,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjg1NjIxOQ==","user":{"login":"samuela","id":226872,"node_id":"MDQ6VXNlcjIyNjg3Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/226872?v=4","gravatar_id":"","url":"https://api.github.com/users/samuela","html_url":"https://github.com/samuela","followers_url":"https://api.github.com/users/samuela/followers","following_url":"https://api.github.com/users/samuela/following{/other_user}","gists_url":"https://api.github.com/users/samuela/gists{/gist_id}","starred_url":"https://api.github.com/users/samuela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samuela/subscriptions","organizations_url":"https://api.github.com/users/samuela/orgs","repos_url":"https://api.github.com/users/samuela/repos","events_url":"https://api.github.com/users/samuela/events{/privacy}","received_events_url":"https://api.github.com/users/samuela/received_events","type":"User","site_admin":false},"created_at":"2018-10-24T22:57:51Z","updated_at":"2018-10-24T22:57:51Z","author_association":"NONE","body":"Another case where this is super helpful: When you want to emulate ML-style algebraic data types you're screwed for variants that don't have any fields. For example,\r\n```graphql\r\ntype Mutation {\r\n  createUser(email: String!, password: String!): CreateUserPayload!\r\n}\r\n\r\ntype UserWithEmailAlreadyExists {}\r\ntype WeakPassword {}\r\ntype AuthPayload {\r\n  user: User!\r\n  token: AccessToken!\r\n}\r\nunion CreateUserPayload = UserWithEmailAlreadyExists | WeakPassword | AuthPayload\r\n```"}}
{"actor":{"display_login":"samuela"}}