File tree Expand file tree Collapse file tree 5 files changed +60
-43
lines changed
Expand file tree Collapse file tree 5 files changed +60
-43
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' graphql-config ' : patch
3+ ---
4+
5+ fix ` SchemaPointer ` type, allow both URLs with headers and local type definitions
Original file line number Diff line number Diff line change 5252 "title" : " include"
5353 },
5454 "schema" : {
55- "$ref" : " #/definitions/SchemaPointer " ,
55+ "$ref" : " #/definitions/WithList<string|{[url:string]:{headers:{[name:string]:string;};};}> " ,
5656 "title" : " schema"
5757 }
5858 },
112112 "title" : " IGraphQLProjects" ,
113113 "type" : " object"
114114 },
115- "SchemaPointer " : {
115+ "WithList<string> " : {
116116 "anyOf" : [
117117 {
118118 "items" : {
119119 "type" : " string"
120120 },
121121 "type" : " array"
122122 },
123- {
124- "items" : {
125- "additionalProperties" : {
126- "properties" : {
127- "headers" : {
128- "additionalProperties" : {
129- "type" : " string"
130- },
131- "title" : " headers" ,
132- "type" : " object"
133- }
134- },
135- "required" : [" headers" ],
136- "type" : " object"
137- },
138- "type" : " object"
139- },
140- "type" : " array"
141- },
142123 {
143124 "type" : " string"
144125 }
145126 ],
146- "title" : " SchemaPointer "
127+ "title" : " WithList<string> "
147128 },
148- "WithList<string>" : {
129+ "WithList<string|{[url:string]:{headers:{[name:string]:string;};};} >" : {
149130 "anyOf" : [
131+ {
132+ "additionalProperties" : {
133+ "properties" : {
134+ "headers" : {
135+ "additionalProperties" : {
136+ "type" : " string"
137+ },
138+ "title" : " headers" ,
139+ "type" : " object"
140+ }
141+ },
142+ "required" : [" headers" ],
143+ "type" : " object"
144+ },
145+ "type" : " object"
146+ },
150147 {
151148 "items" : {
152- "type" : " string"
149+ "anyOf" : [
150+ {
151+ "additionalProperties" : {
152+ "properties" : {
153+ "headers" : {
154+ "additionalProperties" : {
155+ "type" : " string"
156+ },
157+ "title" : " headers" ,
158+ "type" : " object"
159+ }
160+ },
161+ "required" : [" headers" ],
162+ "type" : " object"
163+ },
164+ "type" : " object"
165+ },
166+ {
167+ "type" : " string"
168+ }
169+ ]
153170 },
154171 "type" : " array"
155172 },
156173 {
157174 "type" : " string"
158175 }
159176 ],
160- "title" : " WithList<string>"
177+ "title" : " WithList<string|{[url:string]:{headers:{[name:string]:string;};};} >"
161178 }
162179 },
163180 "description" : " Structure of GraphQL Config"
Original file line number Diff line number Diff line change 9191 "ts-node" : " 10.9.1" ,
9292 "tsx" : " 3.12.7" ,
9393 "typescript" : " 5.1.6" ,
94- "typescript-json-schema" : " 0.59 .0" ,
94+ "typescript-json-schema" : " 0.61 .0" ,
9595 "vitest" : " 0.33.0"
9696 },
9797 "repository" : {
Original file line number Diff line number Diff line change @@ -33,15 +33,16 @@ export interface IGraphQLProjectLegacy {
3333
3434export declare type WithList < T > = T | T [ ] ;
3535export declare type ElementOf < TList > = TList extends Array < infer TElement > ? TElement : never ;
36- export declare type SchemaPointer =
37- | WithList < string >
36+ export declare type SchemaPointer = WithList <
37+ | string
3838 | {
3939 [ url : string ] : {
4040 headers : {
4141 [ name : string ] : string ;
4242 } ;
4343 } ;
44- } [ ] ;
44+ }
45+ > ;
4546export declare type SchemaPointerSingle = ElementOf < SchemaPointer > ;
4647export declare type DocumentGlobPathPointer = string ;
4748export declare type DocumentPointer = WithList < DocumentGlobPathPointer > ;
You can’t perform that action at this time.
0 commit comments