{"action":"created","issue":{"url":"https://api.github.com/repos/graphql-java/graphql-java/issues/1208","repository_url":"https://api.github.com/repos/graphql-java/graphql-java","labels_url":"https://api.github.com/repos/graphql-java/graphql-java/issues/1208/labels{/name}","comments_url":"https://api.github.com/repos/graphql-java/graphql-java/issues/1208/comments","events_url":"https://api.github.com/repos/graphql-java/graphql-java/issues/1208/events","html_url":"https://github.com/graphql-java/graphql-java/issues/1208","id":358441363,"node_id":"MDU6SXNzdWUzNTg0NDEzNjM=","number":1208,"title":"Type collection and reference replacement does not descend into directive arguments","user":{"login":"kaqqao","id":831171,"node_id":"MDQ6VXNlcjgzMTE3MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/831171?v=4","gravatar_id":"","url":"https://api.github.com/users/kaqqao","html_url":"https://github.com/kaqqao","followers_url":"https://api.github.com/users/kaqqao/followers","following_url":"https://api.github.com/users/kaqqao/following{/other_user}","gists_url":"https://api.github.com/users/kaqqao/gists{/gist_id}","starred_url":"https://api.github.com/users/kaqqao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaqqao/subscriptions","organizations_url":"https://api.github.com/users/kaqqao/orgs","repos_url":"https://api.github.com/users/kaqqao/repos","events_url":"https://api.github.com/users/kaqqao/events{/privacy}","received_events_url":"https://api.github.com/users/kaqqao/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-10T02:07:59Z","updated_at":"2018-09-10T02:18:29Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Seems like neither `GraphQLTypeCollectingVisitor` nor `GraphQLTypeResolvingVisitor` visit directive arguments at all.\r\nAs a result, a type that is used in directive arguments only does not become a part of the schema i.e. `schema.getTypeMap()` will not contain it.\r\nNeither will a type reference used in a directive argument get replaced.\r\n\r\nHere's a quick example:\r\n\r\n```java\r\nGraphQLSchema schema = GraphQLSchema.newSchema()\r\n                .query(GraphQLObjectType.newObject()\r\n                        .name(\"Query\")\r\n                        .field(GraphQLFieldDefinition.newFieldDefinition()\r\n                                .name(\"test\")\r\n                                .type(Scalars.GraphQLString)\r\n                                .argument(GraphQLArgument.newArgument()\r\n                                        .name(\"in\")\r\n                                        //Gets replaced as expected\r\n                                        .type(new GraphQLTypeReference(\"String\"))\r\n                                )\r\n                                .dataFetcher(env -> \"test\")\r\n                                .withDirective(GraphQLDirective.newDirective()\r\n                                        .name(\"auth\")\r\n                                        .argument(GraphQLArgument.newArgument()\r\n                                                .name(\"role\")\r\n                                                //Does *not* get replaced\r\n                                                .type(new GraphQLTypeReference(\"String\"))\r\n                                                .value(\"Admin\")\r\n                                        )\r\n                                )\r\n                        )\r\n                )\r\n                .build();\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/graphql-java/graphql-java/issues/comments/419768420","html_url":"https://github.com/graphql-java/graphql-java/issues/1208#issuecomment-419768420","issue_url":"https://api.github.com/repos/graphql-java/graphql-java/issues/1208","id":419768420,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTc2ODQyMA==","user":{"login":"kaqqao","id":831171,"node_id":"MDQ6VXNlcjgzMTE3MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/831171?v=4","gravatar_id":"","url":"https://api.github.com/users/kaqqao","html_url":"https://github.com/kaqqao","followers_url":"https://api.github.com/users/kaqqao/followers","following_url":"https://api.github.com/users/kaqqao/following{/other_user}","gists_url":"https://api.github.com/users/kaqqao/gists{/gist_id}","starred_url":"https://api.github.com/users/kaqqao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaqqao/subscriptions","organizations_url":"https://api.github.com/users/kaqqao/orgs","repos_url":"https://api.github.com/users/kaqqao/repos","events_url":"https://api.github.com/users/kaqqao/events{/privacy}","received_events_url":"https://api.github.com/users/kaqqao/received_events","type":"User","site_admin":false},"created_at":"2018-09-10T02:18:29Z","updated_at":"2018-09-10T02:18:29Z","author_association":"CONTRIBUTOR","body":"I now realize that `GraphQLDirective` isn't even a part of the `GraphQLType` hierarchy, so it's never traversed... Does this mean type collection/reference replacement isn't even _supposed_ to work on directives?"}}
{"actor":{"display_login":"kaqqao"}}