Skip to content

Commit 9d6c170

Browse files
committed
Re-format
1 parent 01312c3 commit 9d6c170

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

packages/plugins/typescript/resolvers/tests/ts-resolvers.federation.spec.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -546,8 +546,8 @@ describe('TypeScript Resolvers Plugin + Apollo Federation', () => {
546546
},
547547
});
548548

549-
// UserResolvers should not have `username` resolver because it is marked with `@external`
550-
// UserResolvers should have `name` resolver because whilst it is marked with `@external`, it is provided by `Book.author`
549+
// `UserResolvers` should not have `username` resolver because it is marked with `@external`
550+
// `UserResolvers` should have `name` resolver because whilst it is marked with `@external`, it is provided by `Book.author`
551551
expect(content).toBeSimilarStringTo(`
552552
export type UserResolvers<ContextType = any, ParentType extends ResolversParentTypes['User'] = ResolversParentTypes['User'], FederationType extends FederationTypes['User'] = FederationTypes['User']> = {
553553
__resolveReference?: ReferenceResolver<Maybe<ResolversTypes['User']>,
@@ -562,25 +562,25 @@ describe('TypeScript Resolvers Plugin + Apollo Federation', () => {
562562
};
563563
`);
564564

565-
// AddressResolvers should only have fields not marked with @external
565+
// `AddressResolvers` should only have fields not marked with @external
566566
expect(content).toBeSimilarStringTo(`
567567
export type AddressResolvers<ContextType = any, ParentType extends ResolversParentTypes['Address'] = ResolversParentTypes['Address']> = {
568568
zip?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
569569
};
570570
`);
571571

572-
// FIXME: CompanyResolvers should only have taxCode resolver because it is part of the `@provides` directive in `Book.editor`
572+
// `DateOfBirthResolvers` should not be generated because every field is marked with @external
573+
expect(content).not.toBeSimilarStringTo('export type DateOfBirthResolvers');
574+
575+
// `PlaceOfBirthResolvers` should not be generated because the type is marked with @external, even if `User.placeOfBirth` is not marked with @external
576+
expect(content).not.toBeSimilarStringTo('export type PlaceOfBirthResolvers');
577+
578+
// FIXME: `CompanyResolvers` should only have taxCode resolver because it is part of the `@provides` directive in `Book.editor`, even if the whole `Company` type is marked with @external
573579
// expect(content).toBeSimilarStringTo(`
574580
// export type CompanyResolvers<ContextType = any, ParentType extends ResolversParentTypes['Company'] = ResolversParentTypes['Company']> = {
575581
// taxCode?: Resolver<ResolversTypes['String'], ParentType, ContextType>;
576582
// };
577583
// `);
578-
579-
// DateOfBirthResolvers should not be generated because every field is marked with @external
580-
expect(content).not.toBeSimilarStringTo('export type DateOfBirthResolvers');
581-
582-
// PlaceOfBirthResolvers should not be generated because the type is marked with @external
583-
expect(content).not.toBeSimilarStringTo('export type PlaceOfBirthResolvers');
584584
});
585585

586586
it('should not include _FieldSet scalar', async () => {

0 commit comments

Comments
 (0)