Skip to content

Commit 1ccabfa

Browse files
Update Apollo service query golden files for extended types
Reflect the new behavior where auxiliary types (filters, orderables, mutations, aggregates) are no longer generated for @extends types in the Apollo service query output. This prevents conflicts when composing federated schemas.
1 parent b6272fe commit 1ccabfa

2 files changed

Lines changed: 0 additions & 255 deletions

File tree

graphql/schema/testdata/apolloservice/output/extended-types.graphql

Lines changed: 0 additions & 164 deletions
Original file line numberDiff line numberDiff line change
@@ -290,51 +290,17 @@ input StringHashFilter {
290290
# Generated Types
291291
#######################
292292

293-
type AddAstronautPayload {
294-
astronaut(filter: AstronautFilter, order: AstronautOrder, first: Int, offset: Int): [Astronaut]
295-
numUids: Int
296-
}
297-
298293
type AddMissionPayload {
299294
mission(filter: MissionFilter, order: MissionOrder, first: Int, offset: Int): [Mission]
300295
numUids: Int
301296
}
302297

303-
type AddProductPayload {
304-
product(filter: ProductFilter, order: ProductOrder, first: Int, offset: Int): [Product]
305-
numUids: Int
306-
}
307-
308-
type AstronautAggregateResult {
309-
count: Int
310-
idMin: ID
311-
idMax: ID
312-
nameMin: String
313-
nameMax: String
314-
ageMin: Int
315-
ageMax: Int
316-
ageSum: Int
317-
ageAvg: Float
318-
}
319-
320-
type DeleteAstronautPayload {
321-
astronaut(filter: AstronautFilter, order: AstronautOrder, first: Int, offset: Int): [Astronaut]
322-
msg: String
323-
numUids: Int
324-
}
325-
326298
type DeleteMissionPayload {
327299
mission(filter: MissionFilter, order: MissionOrder, first: Int, offset: Int): [Mission]
328300
msg: String
329301
numUids: Int
330302
}
331303

332-
type DeleteProductPayload {
333-
product(filter: ProductFilter, order: ProductOrder, first: Int, offset: Int): [Product]
334-
msg: String
335-
numUids: Int
336-
}
337-
338304
type MissionAggregateResult {
339305
count: Int
340306
designationMin: String
@@ -345,47 +311,15 @@ type MissionAggregateResult {
345311
endDateMax: String
346312
}
347313

348-
type ProductAggregateResult {
349-
count: Int
350-
upcMin: String
351-
upcMax: String
352-
shippingEstimateMin: Float
353-
shippingEstimateMax: Float
354-
shippingEstimateSum: Float
355-
shippingEstimateAvg: Float
356-
}
357-
358-
type UpdateAstronautPayload {
359-
astronaut(filter: AstronautFilter, order: AstronautOrder, first: Int, offset: Int): [Astronaut]
360-
numUids: Int
361-
}
362-
363314
type UpdateMissionPayload {
364315
mission(filter: MissionFilter, order: MissionOrder, first: Int, offset: Int): [Mission]
365316
numUids: Int
366317
}
367318

368-
type UpdateProductPayload {
369-
product(filter: ProductFilter, order: ProductOrder, first: Int, offset: Int): [Product]
370-
numUids: Int
371-
}
372-
373319
#######################
374320
# Generated Enums
375321
#######################
376322

377-
enum AstronautHasFilter {
378-
name
379-
age
380-
missions
381-
}
382-
383-
enum AstronautOrderable {
384-
id
385-
name
386-
age
387-
}
388-
389323
enum MissionHasFilter {
390324
crew
391325
designation
@@ -399,68 +333,16 @@ enum MissionOrderable {
399333
endDate
400334
}
401335

402-
enum ProductHasFilter {
403-
upc
404-
inStock
405-
shippingEstimate
406-
}
407-
408-
enum ProductOrderable {
409-
upc
410-
shippingEstimate
411-
}
412-
413336
#######################
414337
# Generated Inputs
415338
#######################
416339

417-
input AddAstronautInput {
418-
id: ID!
419-
name: String
420-
age: Int
421-
missions: [MissionRef]
422-
}
423-
424340
input AddMissionInput {
425-
crew: [AstronautRef]
426341
designation: String!
427342
startDate: String
428343
endDate: String
429344
}
430345

431-
input AddProductInput {
432-
upc: String!
433-
inStock: Boolean
434-
shippingEstimate: Float
435-
}
436-
437-
input AstronautFilter {
438-
id: [ID!]
439-
has: [AstronautHasFilter]
440-
and: [AstronautFilter]
441-
or: [AstronautFilter]
442-
not: AstronautFilter
443-
}
444-
445-
input AstronautOrder {
446-
asc: AstronautOrderable
447-
desc: AstronautOrderable
448-
then: AstronautOrder
449-
}
450-
451-
input AstronautPatch {
452-
name: String
453-
age: Int
454-
missions: [MissionRef]
455-
}
456-
457-
input AstronautRef {
458-
id: ID
459-
name: String
460-
age: Int
461-
missions: [MissionRef]
462-
}
463-
464346
input MissionFilter {
465347
id: [ID!]
466348
has: [MissionHasFilter]
@@ -476,64 +358,24 @@ input MissionOrder {
476358
}
477359

478360
input MissionPatch {
479-
crew: [AstronautRef]
480361
designation: String
481362
startDate: String
482363
endDate: String
483364
}
484365

485366
input MissionRef {
486367
id: ID
487-
crew: [AstronautRef]
488368
designation: String
489369
startDate: String
490370
endDate: String
491371
}
492372

493-
input ProductFilter {
494-
upc: StringHashFilter
495-
has: [ProductHasFilter]
496-
and: [ProductFilter]
497-
or: [ProductFilter]
498-
not: ProductFilter
499-
}
500-
501-
input ProductOrder {
502-
asc: ProductOrderable
503-
desc: ProductOrderable
504-
then: ProductOrder
505-
}
506-
507-
input ProductPatch {
508-
upc: String
509-
inStock: Boolean
510-
shippingEstimate: Float
511-
}
512-
513-
input ProductRef {
514-
upc: String
515-
inStock: Boolean
516-
shippingEstimate: Float
517-
}
518-
519-
input UpdateAstronautInput {
520-
filter: AstronautFilter!
521-
set: AstronautPatch
522-
remove: AstronautPatch
523-
}
524-
525373
input UpdateMissionInput {
526374
filter: MissionFilter!
527375
set: MissionPatch
528376
remove: MissionPatch
529377
}
530378

531-
input UpdateProductInput {
532-
filter: ProductFilter!
533-
set: ProductPatch
534-
remove: ProductPatch
535-
}
536-
537379
#######################
538380
# Generated Query
539381
#######################
@@ -552,11 +394,5 @@ type Mutation {
552394
addMission(input: [AddMissionInput!]!): AddMissionPayload
553395
updateMission(input: UpdateMissionInput!): UpdateMissionPayload
554396
deleteMission(filter: MissionFilter!): DeleteMissionPayload
555-
addAstronaut(input: [AddAstronautInput!]!): AddAstronautPayload
556-
updateAstronaut(input: UpdateAstronautInput!): UpdateAstronautPayload
557-
deleteAstronaut(filter: AstronautFilter!): DeleteAstronautPayload
558-
addProduct(input: [AddProductInput!]!, upsert: Boolean): AddProductPayload
559-
updateProduct(input: UpdateProductInput!): UpdateProductPayload
560-
deleteProduct(filter: ProductFilter!): DeleteProductPayload
561397
}
562398

graphql/schema/testdata/apolloservice/output/single-extended-type.graphql

Lines changed: 0 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -267,94 +267,3 @@ input StringHashFilter {
267267
in: [String]
268268
}
269269

270-
#######################
271-
# Generated Types
272-
#######################
273-
274-
type AddProductPayload {
275-
product(filter: ProductFilter, order: ProductOrder, first: Int, offset: Int): [Product]
276-
numUids: Int
277-
}
278-
279-
type DeleteProductPayload {
280-
product(filter: ProductFilter, order: ProductOrder, first: Int, offset: Int): [Product]
281-
msg: String
282-
numUids: Int
283-
}
284-
285-
type ProductAggregateResult {
286-
count: Int
287-
idMin: String
288-
idMax: String
289-
nameMin: String
290-
nameMax: String
291-
}
292-
293-
type UpdateProductPayload {
294-
product(filter: ProductFilter, order: ProductOrder, first: Int, offset: Int): [Product]
295-
numUids: Int
296-
}
297-
298-
#######################
299-
# Generated Enums
300-
#######################
301-
302-
enum ProductHasFilter {
303-
id
304-
name
305-
}
306-
307-
enum ProductOrderable {
308-
id
309-
name
310-
}
311-
312-
#######################
313-
# Generated Inputs
314-
#######################
315-
316-
input AddProductInput {
317-
id: String!
318-
name: String!
319-
}
320-
321-
input ProductFilter {
322-
id: StringHashFilter
323-
has: [ProductHasFilter]
324-
and: [ProductFilter]
325-
or: [ProductFilter]
326-
not: ProductFilter
327-
}
328-
329-
input ProductOrder {
330-
asc: ProductOrderable
331-
desc: ProductOrderable
332-
then: ProductOrder
333-
}
334-
335-
input ProductPatch {
336-
id: String
337-
name: String
338-
}
339-
340-
input ProductRef {
341-
id: String
342-
name: String
343-
}
344-
345-
input UpdateProductInput {
346-
filter: ProductFilter!
347-
set: ProductPatch
348-
remove: ProductPatch
349-
}
350-
351-
#######################
352-
# Generated Mutations
353-
#######################
354-
355-
type Mutation {
356-
addProduct(input: [AddProductInput!]!, upsert: Boolean): AddProductPayload
357-
updateProduct(input: UpdateProductInput!): UpdateProductPayload
358-
deleteProduct(filter: ProductFilter!): DeleteProductPayload
359-
}
360-

0 commit comments

Comments
 (0)