File tree Expand file tree Collapse file tree
apollo-language-server/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,3 +20,7 @@ export * from "./engine";
2020
2121// Config
2222export * from "./config" ;
23+
24+ // Generated types
25+ import * as graphqlTypes from "./graphqlTypes" ;
26+ export { graphqlTypes } ;
Original file line number Diff line number Diff line change 11import { flags } from "@oclif/command" ;
2- import { table } from "heroku-cli-util" ;
32import { print } from "graphql" ;
4-
53import { gitInfo } from "../../git" ;
64import { ClientCommand } from "../../Command" ;
75import URI from "vscode-uri" ;
86import { relative } from "path" ;
9- import {
10- ValidateOperations_service_validateOperations_validationResults as ValidationResult ,
11- ValidationErrorType
12- } from "apollo-language-server/src/graphqlTypes" ;
7+ import { graphqlTypes } from "apollo-language-server" ;
138import chalk from "chalk" ;
149
10+ const { ValidationErrorType } = graphqlTypes ;
11+ type ValidationResult = graphqlTypes . ValidateOperations_service_validateOperations_validationResults ;
12+
1513interface Operation {
1614 body : string ;
1715 name : string ;
@@ -157,7 +155,8 @@ export default class ClientCheck extends ClientCommand {
157155 [ ValidationErrorType . INVALID ] : [ ] ,
158156 [ ValidationErrorType . FAILURE ] : [ ] ,
159157 [ ValidationErrorType . WARNING ] : [ ]
160- } as { [ key in ValidationErrorType ] : ValidationResult [ ] }
158+ // XXX TS doesn't recognize ValidationErrorType as a type unless prefixed with graphqlTypes
159+ } as { [ key in graphqlTypes . ValidationErrorType ] : ValidationResult [ ] }
161160 ) ;
162161
163162 Object . values ( byErrorType ) . map ( validations => {
Original file line number Diff line number Diff line change 11import { duration } from "moment" ;
2- import { HistoricQueryParameters } from "apollo-language-server/lib/graphqlTypes " ;
2+ import { graphqlTypes } from "apollo-language-server" ;
33
44export function validateHistoricParams ( {
55 validationPeriod,
@@ -9,7 +9,7 @@ export function validateHistoricParams({
99 validationPeriod : string ;
1010 queryCountThreshold : number ;
1111 queryCountThresholdPercentage : number ;
12- } > ) : Partial < HistoricQueryParameters > | null {
12+ } > ) : Partial < graphqlTypes . HistoricQueryParameters > | null {
1313 if (
1414 ! validationPeriod &&
1515 ! queryCountThreshold &&
You can’t perform that action at this time.
0 commit comments