File tree 5 files changed +60
-43
lines changed
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 52
52
"title" : " include"
53
53
},
54
54
"schema" : {
55
- "$ref" : " #/definitions/SchemaPointer " ,
55
+ "$ref" : " #/definitions/WithList<string|{[url:string]:{headers:{[name:string]:string;};};}> " ,
56
56
"title" : " schema"
57
57
}
58
58
},
112
112
"title" : " IGraphQLProjects" ,
113
113
"type" : " object"
114
114
},
115
- "SchemaPointer " : {
115
+ "WithList<string> " : {
116
116
"anyOf" : [
117
117
{
118
118
"items" : {
119
119
"type" : " string"
120
120
},
121
121
"type" : " array"
122
122
},
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
- },
142
123
{
143
124
"type" : " string"
144
125
}
145
126
],
146
- "title" : " SchemaPointer "
127
+ "title" : " WithList<string> "
147
128
},
148
- "WithList<string>" : {
129
+ "WithList<string|{[url:string]:{headers:{[name:string]:string;};};} >" : {
149
130
"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
+ },
150
147
{
151
148
"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
+ ]
153
170
},
154
171
"type" : " array"
155
172
},
156
173
{
157
174
"type" : " string"
158
175
}
159
176
],
160
- "title" : " WithList<string>"
177
+ "title" : " WithList<string|{[url:string]:{headers:{[name:string]:string;};};} >"
161
178
}
162
179
},
163
180
"description" : " Structure of GraphQL Config"
Original file line number Diff line number Diff line change 91
91
"ts-node" : " 10.9.1" ,
92
92
"tsx" : " 3.12.7" ,
93
93
"typescript" : " 5.1.6" ,
94
- "typescript-json-schema" : " 0.59 .0" ,
94
+ "typescript-json-schema" : " 0.61 .0" ,
95
95
"vitest" : " 0.33.0"
96
96
},
97
97
"repository" : {
Original file line number Diff line number Diff line change @@ -33,15 +33,16 @@ export interface IGraphQLProjectLegacy {
33
33
34
34
export declare type WithList < T > = T | T [ ] ;
35
35
export 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
38
38
| {
39
39
[ url : string ] : {
40
40
headers : {
41
41
[ name : string ] : string ;
42
42
} ;
43
43
} ;
44
- } [ ] ;
44
+ }
45
+ > ;
45
46
export declare type SchemaPointerSingle = ElementOf < SchemaPointer > ;
46
47
export declare type DocumentGlobPathPointer = string ;
47
48
export declare type DocumentPointer = WithList < DocumentGlobPathPointer > ;
You can’t perform that action at this time.
0 commit comments