{"action":"reopened","issue":{"url":"https://api.github.com/repos/apollographql/apollo-angular/issues/817","repository_url":"https://api.github.com/repos/apollographql/apollo-angular","labels_url":"https://api.github.com/repos/apollographql/apollo-angular/issues/817/labels{/name}","comments_url":"https://api.github.com/repos/apollographql/apollo-angular/issues/817/comments","events_url":"https://api.github.com/repos/apollographql/apollo-angular/issues/817/events","html_url":"https://github.com/apollographql/apollo-angular/issues/817","id":360277145,"node_id":"MDU6SXNzdWUzNjAyNzcxNDU=","number":817,"title":"How do I make variable type known to Query ?","user":{"login":"catull","id":150055,"node_id":"MDQ6VXNlcjE1MDA1NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/150055?v=4","gravatar_id":"","url":"https://api.github.com/users/catull","html_url":"https://github.com/catull","followers_url":"https://api.github.com/users/catull/followers","following_url":"https://api.github.com/users/catull/following{/other_user}","gists_url":"https://api.github.com/users/catull/gists{/gist_id}","starred_url":"https://api.github.com/users/catull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/catull/subscriptions","organizations_url":"https://api.github.com/users/catull/orgs","repos_url":"https://api.github.com/users/catull/repos","events_url":"https://api.github.com/users/catull/events{/privacy}","received_events_url":"https://api.github.com/users/catull/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-14T12:04:01Z","updated_at":"2018-09-14T13:50:46Z","closed_at":null,"author_association":"NONE","body":"Got this query, which works nicely in `GraphQL Playground`:\r\n\r\n```typescript\r\nimport { Injectable } from '@angular/core';\r\nimport { Apollo, Query } from 'apollo-angular';\r\nimport gql from 'graphql-tag';\r\n\r\nimport { PublicationsPagePublication, SortInput } from './api';\r\n\r\ninterface IVariables {\r\n  pageNumber: number;\r\n  pageSize: number;\r\n  sort: SortInput;\r\n}\r\n\r\n@Injectable({\r\n  providedIn: 'root',\r\n})\r\nexport class PublicationSearchGQL extends Query<PublicationsPagePublication, IVariables> {\r\n  document = gql`\r\nquery publicationPage(\r\n  $pageSize: Int\r\n  $pageNumber: Int\r\n  $sort: SortInput\r\n) {\r\n  publicationsPage(\r\n    pageSize: $pageSize\r\n    pageNumber: $pageNumber\r\n    sort: $sort\r\n  ) {\r\n    publications {\r\n      id\r\n    }\r\n  }\r\n}\r\n  `;\r\n\r\n  constructor(apollo: Apollo) {\r\n    super(apollo);\r\n  }\r\n}\r\n```\r\nWhen an instance of `PublicationSearchGQL` is used as\r\n\r\n```typescript\r\n    this.publicationSearchQuery\r\n      .fetch({\r\n        pageSize: 15,\r\n        pageNumber: this.paginationConfig.pageIndex,\r\n        filters,\r\n      })\r\n      .subscribe(result => {\r\n           // nice things are done here\r\n      });\r\n```\r\nat runtime, there are validation errors for 'SortInput`:\r\n\r\n```json\r\n{\r\n  \"errors\": [\r\n    {\r\n      \"message\": \"Validation error of type UnknownType: Unknown type SortInput\",\r\n      \"locations\": [{ \"line\": 1, \"column\": 64 }]\r\n    },\r\n    {\r\n      \"message\": \"Validation error of type UnknownArgument: Unknown field argument sort @ 'publicationsPage'\",\r\n      \"locations\": [{ \"line\": 2, \"column\": 66 }]\r\n    }\r\n  ]\r\n}\r\n```\r\nWhat am I missing ?\r\n"}}
{"actor":{"display_login":"kamilkisiela"}}