@@ -319,30 +319,30 @@ std::shared_ptr<Schema> Schema::StitchSchema(const std::shared_ptr<const Schema>
319
319
const auto itrOriginal = _typeMap.find (name);
320
320
const auto itrAdded = added->_typeMap .find (name);
321
321
internal::string_view_set names;
322
- std::vector<std::shared_ptr<const Field>> stitchedValues ;
322
+ std::vector<std::shared_ptr<const Field>> stitchedFields ;
323
323
324
324
if (itrOriginal != _typeMap.end ())
325
325
{
326
326
const auto & originalType = _types[itrOriginal->second ].second ;
327
327
const auto & interfaceFields = originalType->fields ();
328
328
329
- for (const auto & field : interfaceFields)
329
+ for (const auto & interfaceField : interfaceFields)
330
330
{
331
331
std::vector<std::shared_ptr<const InputValue>> stitchedArgs;
332
332
333
- for (const auto & value : field ->args ())
333
+ for (const auto & arg : interfaceField ->args ())
334
334
{
335
- stitchedArgs.push_back (InputValue::Make (value ->name (),
336
- value ->description (),
337
- schema->StitchFieldType (value ->type ().lock ()),
338
- value ->defaultValue ()));
335
+ stitchedArgs.push_back (InputValue::Make (arg ->name (),
336
+ arg ->description (),
337
+ schema->StitchFieldType (arg ->type ().lock ()),
338
+ arg ->defaultValue ()));
339
339
}
340
340
341
- names.emplace (field ->name ());
342
- stitchedValues .push_back (Field::Make (field ->name (),
343
- field ->description (),
344
- field ->deprecationReason (),
345
- schema->StitchFieldType (field ->type ().lock ()),
341
+ names.emplace (interfaceField ->name ());
342
+ stitchedFields .push_back (Field::Make (interfaceField ->name (),
343
+ interfaceField ->description (),
344
+ interfaceField ->deprecationReason (),
345
+ schema->StitchFieldType (interfaceField ->type ().lock ()),
346
346
std::move (stitchedArgs)));
347
347
}
348
348
}
@@ -352,32 +352,32 @@ std::shared_ptr<Schema> Schema::StitchSchema(const std::shared_ptr<const Schema>
352
352
const auto & addedType = _types[itrAdded->second ].second ;
353
353
const auto & interfaceFields = addedType->fields ();
354
354
355
- for (const auto & field : interfaceFields)
355
+ for (const auto & interfaceField : interfaceFields)
356
356
{
357
- if (!names.emplace (field ->name ()).second )
357
+ if (!names.emplace (interfaceField ->name ()).second )
358
358
{
359
359
continue ;
360
360
}
361
361
362
362
std::vector<std::shared_ptr<const InputValue>> stitchedArgs;
363
363
364
- for (const auto & value : field ->args ())
364
+ for (const auto & arg : interfaceField ->args ())
365
365
{
366
- stitchedArgs.push_back (InputValue::Make (value ->name (),
367
- value ->description (),
368
- schema->StitchFieldType (value ->type ().lock ()),
369
- value ->defaultValue ()));
366
+ stitchedArgs.push_back (InputValue::Make (arg ->name (),
367
+ arg ->description (),
368
+ schema->StitchFieldType (arg ->type ().lock ()),
369
+ arg ->defaultValue ()));
370
370
}
371
371
372
- stitchedValues .push_back (Field::Make (field ->name (),
373
- field ->description (),
374
- field ->deprecationReason (),
375
- schema->StitchFieldType (field ->type ().lock ()),
372
+ stitchedFields .push_back (Field::Make (interfaceField ->name (),
373
+ interfaceField ->description (),
374
+ interfaceField ->deprecationReason (),
375
+ schema->StitchFieldType (interfaceField ->type ().lock ()),
376
376
std::move (stitchedArgs)));
377
377
}
378
378
}
379
379
380
- stitchedType->AddFields (std::move (stitchedValues ));
380
+ stitchedType->AddFields (std::move (stitchedFields ));
381
381
}
382
382
383
383
for (const auto & entry : unionTypes)
@@ -391,32 +391,32 @@ std::shared_ptr<Schema> Schema::StitchSchema(const std::shared_ptr<const Schema>
391
391
if (itrOriginal != _typeMap.end ())
392
392
{
393
393
const auto & originalType = _types[itrOriginal->second ].second ;
394
- const auto & unionValues = originalType->possibleTypes ();
394
+ const auto & possibleTypes = originalType->possibleTypes ();
395
395
396
- for (const auto & value : unionValues )
396
+ for (const auto & possibleType : possibleTypes )
397
397
{
398
- const auto possibleType = value .lock ();
398
+ const auto possible = possibleType .lock ();
399
399
400
- names.emplace (possibleType ->name ());
401
- stitchedValues.push_back (schema->LookupType (possibleType ->name ()));
400
+ names.emplace (possible ->name ());
401
+ stitchedValues.push_back (schema->LookupType (possible ->name ()));
402
402
}
403
403
}
404
404
405
405
if (itrAdded != added->_typeMap .end ())
406
406
{
407
407
const auto & addedType = _types[itrAdded->second ].second ;
408
- const auto & unionValues = addedType->possibleTypes ();
408
+ const auto & possibleTypes = addedType->possibleTypes ();
409
409
410
- for (const auto & value : unionValues )
410
+ for (const auto & possibleType : possibleTypes )
411
411
{
412
- const auto possibleType = value .lock ();
412
+ const auto possible = possibleType .lock ();
413
413
414
- if (!names.emplace (possibleType ->name ()).second )
414
+ if (!names.emplace (possible ->name ()).second )
415
415
{
416
416
continue ;
417
417
}
418
418
419
- stitchedValues.push_back (schema->LookupType (possibleType ->name ()));
419
+ stitchedValues.push_back (schema->LookupType (possible ->name ()));
420
420
}
421
421
}
422
422
@@ -436,75 +436,75 @@ std::shared_ptr<Schema> Schema::StitchSchema(const std::shared_ptr<const Schema>
436
436
if (itrOriginal != _typeMap.end ())
437
437
{
438
438
const auto & originalType = _types[itrOriginal->second ].second ;
439
- const auto & interfaceValues = originalType->interfaces ();
439
+ const auto & objectInterfaces = originalType->interfaces ();
440
440
441
- for (const auto & value : interfaceValues )
441
+ for (const auto & interfaceType : objectInterfaces )
442
442
{
443
- interfaceNames.emplace (value ->name ());
444
- stitchedInterfaces.push_back (interfaceTypes[value ->name ()]);
443
+ interfaceNames.emplace (interfaceType ->name ());
444
+ stitchedInterfaces.push_back (interfaceTypes[interfaceType ->name ()]);
445
445
}
446
446
447
447
const auto & objectFields = originalType->fields ();
448
448
449
- for (const auto & field : objectFields)
449
+ for (const auto & objectField : objectFields)
450
450
{
451
451
std::vector<std::shared_ptr<const InputValue>> stitchedArgs;
452
452
453
- for (const auto & value : field ->args ())
453
+ for (const auto & arg : objectField ->args ())
454
454
{
455
- stitchedArgs.push_back (InputValue::Make (value ->name (),
456
- value ->description (),
457
- schema->StitchFieldType (value ->type ().lock ()),
458
- value ->defaultValue ()));
455
+ stitchedArgs.push_back (InputValue::Make (arg ->name (),
456
+ arg ->description (),
457
+ schema->StitchFieldType (arg ->type ().lock ()),
458
+ arg ->defaultValue ()));
459
459
}
460
460
461
- fieldNames.emplace (field ->name ());
462
- stitchedValues.push_back (Field::Make (field ->name (),
463
- field ->description (),
464
- field ->deprecationReason (),
465
- schema->StitchFieldType (field ->type ().lock ()),
461
+ fieldNames.emplace (objectField ->name ());
462
+ stitchedValues.push_back (Field::Make (objectField ->name (),
463
+ objectField ->description (),
464
+ objectField ->deprecationReason (),
465
+ schema->StitchFieldType (objectField ->type ().lock ()),
466
466
std::move (stitchedArgs)));
467
467
}
468
468
}
469
469
470
470
if (itrAdded != added->_typeMap .end ())
471
471
{
472
472
const auto & addedType = _types[itrAdded->second ].second ;
473
- const auto & interfaceValues = addedType->interfaces ();
473
+ const auto & objectInterfaces = addedType->interfaces ();
474
474
475
- for (const auto & value : interfaceValues )
475
+ for (const auto & interfaceType : objectInterfaces )
476
476
{
477
- if (!interfaceNames.emplace (value ->name ()).second )
477
+ if (!interfaceNames.emplace (interfaceType ->name ()).second )
478
478
{
479
479
continue ;
480
480
}
481
481
482
- stitchedInterfaces.push_back (interfaceTypes[value ->name ()]);
482
+ stitchedInterfaces.push_back (interfaceTypes[interfaceType ->name ()]);
483
483
}
484
484
485
485
const auto & objectFields = addedType->fields ();
486
486
487
- for (const auto & field : objectFields)
487
+ for (const auto & objectField : objectFields)
488
488
{
489
- if (!fieldNames.emplace (field ->name ()).second )
489
+ if (!fieldNames.emplace (objectField ->name ()).second )
490
490
{
491
491
continue ;
492
492
}
493
493
494
494
std::vector<std::shared_ptr<const InputValue>> stitchedArgs;
495
495
496
- for (const auto & value : field ->args ())
496
+ for (const auto & arg : objectField ->args ())
497
497
{
498
- stitchedArgs.push_back (InputValue::Make (value ->name (),
499
- value ->description (),
500
- schema->StitchFieldType (value ->type ().lock ()),
501
- value ->defaultValue ()));
498
+ stitchedArgs.push_back (InputValue::Make (arg ->name (),
499
+ arg ->description (),
500
+ schema->StitchFieldType (arg ->type ().lock ()),
501
+ arg ->defaultValue ()));
502
502
}
503
503
504
- stitchedValues.push_back (Field::Make (field ->name (),
505
- field ->description (),
506
- field ->deprecationReason (),
507
- schema->StitchFieldType (field ->type ().lock ()),
504
+ stitchedValues.push_back (Field::Make (objectField ->name (),
505
+ objectField ->description (),
506
+ objectField ->deprecationReason (),
507
+ schema->StitchFieldType (objectField ->type ().lock ()),
508
508
std::move (stitchedArgs)));
509
509
}
510
510
}
@@ -525,12 +525,12 @@ std::shared_ptr<Schema> Schema::StitchSchema(const std::shared_ptr<const Schema>
525
525
526
526
std::vector<std::shared_ptr<const InputValue>> stitchedArgs;
527
527
528
- for (const auto & value : originalDirective->args ())
528
+ for (const auto & arg : originalDirective->args ())
529
529
{
530
- stitchedArgs.push_back (InputValue::Make (value ->name (),
531
- value ->description (),
532
- schema->StitchFieldType (value ->type ().lock ()),
533
- value ->defaultValue ()));
530
+ stitchedArgs.push_back (InputValue::Make (arg ->name (),
531
+ arg ->description (),
532
+ schema->StitchFieldType (arg ->type ().lock ()),
533
+ arg ->defaultValue ()));
534
534
}
535
535
536
536
stitchedDirectives.push_back (Directive::Make (originalDirective->name (),
@@ -549,12 +549,12 @@ std::shared_ptr<Schema> Schema::StitchSchema(const std::shared_ptr<const Schema>
549
549
550
550
std::vector<std::shared_ptr<const InputValue>> stitchedArgs;
551
551
552
- for (const auto & value : addedDirective->args ())
552
+ for (const auto & arg : addedDirective->args ())
553
553
{
554
- stitchedArgs.push_back (InputValue::Make (value ->name (),
555
- value ->description (),
556
- schema->StitchFieldType (value ->type ().lock ()),
557
- value ->defaultValue ()));
554
+ stitchedArgs.push_back (InputValue::Make (arg ->name (),
555
+ arg ->description (),
556
+ schema->StitchFieldType (arg ->type ().lock ()),
557
+ arg ->defaultValue ()));
558
558
}
559
559
560
560
stitchedDirectives.push_back (Directive::Make (addedDirective->name (),
0 commit comments