@nestjs/apollo 13.3.0 → 13.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/drivers/apollo-base.driver.js +1 -1
- package/dist/drivers/apollo-gateway.driver.d.ts +1 -0
- package/dist/drivers/apollo-gateway.driver.d.ts.map +1 -1
- package/dist/drivers/apollo-gateway.driver.js +38 -2
- package/dist/interfaces/apollo-driver-config.interface.d.ts +14 -0
- package/dist/interfaces/apollo-driver-config.interface.d.ts.map +1 -1
- package/dist/interfaces/apollo-gateway-driver-config.interface.d.ts +13 -0
- package/dist/interfaces/apollo-gateway-driver-config.interface.d.ts.map +1 -1
- package/dist/tests/lib/constants/apollo.constants.d.ts +2 -0
- package/dist/tests/lib/constants/apollo.constants.d.ts.map +1 -0
- package/dist/tests/lib/constants/apollo.constants.js +4 -0
- package/dist/tests/lib/constants/index.d.ts +2 -0
- package/dist/tests/lib/constants/index.d.ts.map +1 -0
- package/dist/tests/lib/constants/index.js +4 -0
- package/dist/tests/lib/decorators/index.d.ts +2 -0
- package/dist/tests/lib/decorators/index.d.ts.map +1 -0
- package/dist/tests/lib/decorators/index.js +4 -0
- package/dist/tests/lib/decorators/plugin.decorator.d.ts +7 -0
- package/dist/tests/lib/decorators/plugin.decorator.d.ts.map +1 -0
- package/dist/tests/lib/decorators/plugin.decorator.js +15 -0
- package/dist/tests/lib/drivers/apollo-base.driver.d.ts +23 -0
- package/dist/tests/lib/drivers/apollo-base.driver.d.ts.map +1 -0
- package/dist/tests/lib/drivers/apollo-base.driver.js +262 -0
- package/dist/tests/lib/drivers/apollo-federation.driver.d.ts +17 -0
- package/dist/tests/lib/drivers/apollo-federation.driver.d.ts.map +1 -0
- package/dist/tests/lib/drivers/apollo-federation.driver.js +46 -0
- package/dist/tests/lib/drivers/apollo-gateway.driver.d.ts +15 -0
- package/dist/tests/lib/drivers/apollo-gateway.driver.d.ts.map +1 -0
- package/dist/tests/lib/drivers/apollo-gateway.driver.js +80 -0
- package/dist/tests/lib/drivers/apollo.driver.d.ts +15 -0
- package/dist/tests/lib/drivers/apollo.driver.d.ts.map +1 -0
- package/dist/tests/lib/drivers/apollo.driver.js +57 -0
- package/dist/tests/lib/drivers/index.d.ts +4 -0
- package/dist/tests/lib/drivers/index.d.ts.map +1 -0
- package/dist/tests/lib/drivers/index.js +6 -0
- package/dist/tests/lib/errors/authentication.error.d.ts +14 -0
- package/dist/tests/lib/errors/authentication.error.d.ts.map +1 -0
- package/dist/tests/lib/errors/authentication.error.js +25 -0
- package/dist/tests/lib/errors/forbidden.error.d.ts +14 -0
- package/dist/tests/lib/errors/forbidden.error.d.ts.map +1 -0
- package/dist/tests/lib/errors/forbidden.error.js +25 -0
- package/dist/tests/lib/errors/index.d.ts +5 -0
- package/dist/tests/lib/errors/index.d.ts.map +1 -0
- package/dist/tests/lib/errors/index.js +7 -0
- package/dist/tests/lib/errors/user-input.error.d.ts +14 -0
- package/dist/tests/lib/errors/user-input.error.d.ts.map +1 -0
- package/dist/tests/lib/errors/user-input.error.js +26 -0
- package/dist/tests/lib/errors/validation.error.d.ts +14 -0
- package/dist/tests/lib/errors/validation.error.d.ts.map +1 -0
- package/dist/tests/lib/errors/validation.error.js +26 -0
- package/dist/tests/lib/graphiql/graphiql-html.factory.d.ts +5 -0
- package/dist/tests/lib/graphiql/graphiql-html.factory.d.ts.map +1 -0
- package/dist/tests/lib/graphiql/graphiql-html.factory.js +69 -0
- package/dist/tests/lib/graphiql/graphiql-playground.plugin.d.ts +13 -0
- package/dist/tests/lib/graphiql/graphiql-playground.plugin.d.ts.map +1 -0
- package/dist/tests/lib/graphiql/graphiql-playground.plugin.js +19 -0
- package/dist/tests/lib/graphiql/interfaces/graphiql-options.interface.d.ts +33 -0
- package/dist/tests/lib/graphiql/interfaces/graphiql-options.interface.d.ts.map +1 -0
- package/dist/tests/lib/graphiql/interfaces/graphiql-options.interface.js +2 -0
- package/dist/tests/lib/index.d.ts +7 -0
- package/dist/tests/lib/index.d.ts.map +1 -0
- package/dist/tests/lib/index.js +9 -0
- package/dist/tests/lib/interfaces/apollo-driver-config.interface.d.ts +44 -0
- package/dist/tests/lib/interfaces/apollo-driver-config.interface.d.ts.map +1 -0
- package/dist/tests/lib/interfaces/apollo-driver-config.interface.js +2 -0
- package/dist/tests/lib/interfaces/apollo-federation-driver-config.interface.d.ts +5 -0
- package/dist/tests/lib/interfaces/apollo-federation-driver-config.interface.d.ts.map +1 -0
- package/dist/tests/lib/interfaces/apollo-federation-driver-config.interface.js +2 -0
- package/dist/tests/lib/interfaces/apollo-gateway-driver-config.interface.d.ts +37 -0
- package/dist/tests/lib/interfaces/apollo-gateway-driver-config.interface.d.ts.map +1 -0
- package/dist/tests/lib/interfaces/apollo-gateway-driver-config.interface.js +2 -0
- package/dist/tests/lib/interfaces/index.d.ts +4 -0
- package/dist/tests/lib/interfaces/index.d.ts.map +1 -0
- package/dist/tests/lib/interfaces/index.js +6 -0
- package/dist/tests/lib/services/index.d.ts +2 -0
- package/dist/tests/lib/services/index.d.ts.map +1 -0
- package/dist/tests/lib/services/index.js +4 -0
- package/dist/tests/lib/services/plugins-explorer.service.d.ts +10 -0
- package/dist/tests/lib/services/plugins-explorer.service.d.ts.map +1 -0
- package/dist/tests/lib/services/plugins-explorer.service.js +24 -0
- package/dist/tests/lib/utils/async-iterator.util.d.ts +9 -0
- package/dist/tests/lib/utils/async-iterator.util.d.ts.map +1 -0
- package/dist/tests/lib/utils/async-iterator.util.js +60 -0
- package/dist/tests/lib/utils/get-apollo-server.d.ts +11 -0
- package/dist/tests/lib/utils/get-apollo-server.d.ts.map +1 -0
- package/dist/tests/lib/utils/get-apollo-server.js +20 -0
- package/dist/tests/lib/utils/index.d.ts +2 -0
- package/dist/tests/lib/utils/index.d.ts.map +1 -0
- package/dist/tests/lib/utils/index.js +4 -0
- package/dist/tests/tests/code-first/app.module.d.ts +3 -0
- package/dist/tests/tests/code-first/app.module.d.ts.map +1 -0
- package/dist/tests/tests/code-first/app.module.js +26 -0
- package/dist/tests/tests/code-first/cats/cats.module.d.ts +23 -0
- package/dist/tests/tests/code-first/cats/cats.module.d.ts.map +1 -0
- package/dist/tests/tests/code-first/cats/cats.module.js +50 -0
- package/dist/tests/tests/code-first/cats/cats.resolver.d.ts +4 -0
- package/dist/tests/tests/code-first/cats/cats.resolver.d.ts.map +1 -0
- package/dist/tests/tests/code-first/cats/cats.resolver.js +20 -0
- package/dist/tests/tests/code-first/common/filters/unauthorized.filter.d.ts +6 -0
- package/dist/tests/tests/code-first/common/filters/unauthorized.filter.d.ts.map +1 -0
- package/dist/tests/tests/code-first/common/filters/unauthorized.filter.js +15 -0
- package/dist/tests/tests/code-first/common/guards/auth.guard.d.ts +5 -0
- package/dist/tests/tests/code-first/common/guards/auth.guard.d.ts.map +1 -0
- package/dist/tests/tests/code-first/common/guards/auth.guard.js +19 -0
- package/dist/tests/tests/code-first/common/scalars/date.scalar.d.ts +8 -0
- package/dist/tests/tests/code-first/common/scalars/date.scalar.d.ts.map +1 -0
- package/dist/tests/tests/code-first/common/scalars/date.scalar.js +27 -0
- package/dist/tests/tests/code-first/directions/directions.module.d.ts +3 -0
- package/dist/tests/tests/code-first/directions/directions.module.d.ts.map +1 -0
- package/dist/tests/tests/code-first/directions/directions.module.js +14 -0
- package/dist/tests/tests/code-first/directions/directions.resolver.d.ts +5 -0
- package/dist/tests/tests/code-first/directions/directions.resolver.d.ts.map +1 -0
- package/dist/tests/tests/code-first/directions/directions.resolver.js +22 -0
- package/dist/tests/tests/code-first/enums/direction.enum.d.ts +8 -0
- package/dist/tests/tests/code-first/enums/direction.enum.d.ts.map +1 -0
- package/dist/tests/tests/code-first/enums/direction.enum.js +24 -0
- package/dist/tests/tests/code-first/enums/sample-orphaned.enum.d.ts +7 -0
- package/dist/tests/tests/code-first/enums/sample-orphaned.enum.d.ts.map +1 -0
- package/dist/tests/tests/code-first/enums/sample-orphaned.enum.js +15 -0
- package/dist/tests/tests/code-first/main.d.ts +2 -0
- package/dist/tests/tests/code-first/main.d.ts.map +1 -0
- package/dist/tests/tests/code-first/main.js +11 -0
- package/dist/tests/tests/code-first/other/abstract.resolver.d.ts +6 -0
- package/dist/tests/tests/code-first/other/abstract.resolver.d.ts.map +1 -0
- package/dist/tests/tests/code-first/other/abstract.resolver.js +23 -0
- package/dist/tests/tests/code-first/other/sample-orphaned.type.d.ts +8 -0
- package/dist/tests/tests/code-first/other/sample-orphaned.type.d.ts.map +1 -0
- package/dist/tests/tests/code-first/other/sample-orphaned.type.js +35 -0
- package/dist/tests/tests/code-first/other/sample-scalar.d.ts +8 -0
- package/dist/tests/tests/code-first/other/sample-scalar.d.ts.map +1 -0
- package/dist/tests/tests/code-first/other/sample-scalar.js +33 -0
- package/dist/tests/tests/code-first/recipes/dto/filter-recipes-count.args.d.ts +5 -0
- package/dist/tests/tests/code-first/recipes/dto/filter-recipes-count.args.d.ts.map +1 -0
- package/dist/tests/tests/code-first/recipes/dto/filter-recipes-count.args.js +19 -0
- package/dist/tests/tests/code-first/recipes/dto/new-recipe.input.d.ts +7 -0
- package/dist/tests/tests/code-first/recipes/dto/new-recipe.input.d.ts.map +1 -0
- package/dist/tests/tests/code-first/recipes/dto/new-recipe.input.js +32 -0
- package/dist/tests/tests/code-first/recipes/dto/recipes.args.d.ts +5 -0
- package/dist/tests/tests/code-first/recipes/dto/recipes.args.d.ts.map +1 -0
- package/dist/tests/tests/code-first/recipes/dto/recipes.args.js +30 -0
- package/dist/tests/tests/code-first/recipes/ingredients.resolver.d.ts +7 -0
- package/dist/tests/tests/code-first/recipes/ingredients.resolver.d.ts.map +1 -0
- package/dist/tests/tests/code-first/recipes/ingredients.resolver.js +42 -0
- package/dist/tests/tests/code-first/recipes/irecipes.resolver.d.ts +4 -0
- package/dist/tests/tests/code-first/recipes/irecipes.resolver.d.ts.map +1 -0
- package/dist/tests/tests/code-first/recipes/irecipes.resolver.js +22 -0
- package/dist/tests/tests/code-first/recipes/models/category.d.ts +7 -0
- package/dist/tests/tests/code-first/recipes/models/category.d.ts.map +1 -0
- package/dist/tests/tests/code-first/recipes/models/category.js +27 -0
- package/dist/tests/tests/code-first/recipes/models/ingredient.d.ts +12 -0
- package/dist/tests/tests/code-first/recipes/models/ingredient.d.ts.map +1 -0
- package/dist/tests/tests/code-first/recipes/models/ingredient.js +49 -0
- package/dist/tests/tests/code-first/recipes/models/recipe.d.ts +29 -0
- package/dist/tests/tests/code-first/recipes/models/recipe.d.ts.map +1 -0
- package/dist/tests/tests/code-first/recipes/models/recipe.js +80 -0
- package/dist/tests/tests/code-first/recipes/recipes.module.d.ts +3 -0
- package/dist/tests/tests/code-first/recipes/recipes.module.d.ts.map +1 -0
- package/dist/tests/tests/code-first/recipes/recipes.module.js +30 -0
- package/dist/tests/tests/code-first/recipes/recipes.resolver.d.ts +23 -0
- package/dist/tests/tests/code-first/recipes/recipes.resolver.d.ts.map +1 -0
- package/dist/tests/tests/code-first/recipes/recipes.resolver.js +141 -0
- package/dist/tests/tests/code-first/recipes/recipes.service.d.ts +15 -0
- package/dist/tests/tests/code-first/recipes/recipes.service.d.ts.map +1 -0
- package/dist/tests/tests/code-first/recipes/recipes.service.js +44 -0
- package/dist/tests/tests/code-first/recipes/unions/search-result.union.d.ts +4 -0
- package/dist/tests/tests/code-first/recipes/unions/search-result.union.d.ts.map +1 -0
- package/dist/tests/tests/code-first/recipes/unions/search-result.union.js +20 -0
- package/dist/tests/tests/code-first-duplicate-resolvers/app.module.d.ts +3 -0
- package/dist/tests/tests/code-first-duplicate-resolvers/app.module.d.ts.map +1 -0
- package/dist/tests/tests/code-first-duplicate-resolvers/app.module.js +28 -0
- package/dist/tests/tests/code-first-duplicate-resolvers/module-a/module-a.module.d.ts +3 -0
- package/dist/tests/tests/code-first-duplicate-resolvers/module-a/module-a.module.d.ts.map +1 -0
- package/dist/tests/tests/code-first-duplicate-resolvers/module-a/module-a.module.js +16 -0
- package/dist/tests/tests/code-first-duplicate-resolvers/module-a/user.resolver.d.ts +4 -0
- package/dist/tests/tests/code-first-duplicate-resolvers/module-a/user.resolver.d.ts.map +1 -0
- package/dist/tests/tests/code-first-duplicate-resolvers/module-a/user.resolver.js +21 -0
- package/dist/tests/tests/code-first-duplicate-resolvers/module-b/module-b.module.d.ts +3 -0
- package/dist/tests/tests/code-first-duplicate-resolvers/module-b/module-b.module.d.ts.map +1 -0
- package/dist/tests/tests/code-first-duplicate-resolvers/module-b/module-b.module.js +16 -0
- package/dist/tests/tests/code-first-duplicate-resolvers/module-b/user.resolver.d.ts +4 -0
- package/dist/tests/tests/code-first-duplicate-resolvers/module-b/user.resolver.d.ts.map +1 -0
- package/dist/tests/tests/code-first-duplicate-resolvers/module-b/user.resolver.js +21 -0
- package/dist/tests/tests/code-first-duplicate-resolvers/query.resolver.d.ts +4 -0
- package/dist/tests/tests/code-first-duplicate-resolvers/query.resolver.d.ts.map +1 -0
- package/dist/tests/tests/code-first-duplicate-resolvers/query.resolver.js +20 -0
- package/dist/tests/tests/code-first-federation/app.module.d.ts +3 -0
- package/dist/tests/tests/code-first-federation/app.module.d.ts.map +1 -0
- package/dist/tests/tests/code-first-federation/app.module.js +36 -0
- package/dist/tests/tests/code-first-federation/caching.module.d.ts +3 -0
- package/dist/tests/tests/code-first-federation/caching.module.d.ts.map +1 -0
- package/dist/tests/tests/code-first-federation/caching.module.js +59 -0
- package/dist/tests/tests/code-first-federation/human/character.entity.d.ts +5 -0
- package/dist/tests/tests/code-first-federation/human/character.entity.d.ts.map +1 -0
- package/dist/tests/tests/code-first-federation/human/character.entity.js +19 -0
- package/dist/tests/tests/code-first-federation/human/human.entity.d.ts +6 -0
- package/dist/tests/tests/code-first-federation/human/human.entity.d.ts.map +1 -0
- package/dist/tests/tests/code-first-federation/human/human.entity.js +14 -0
- package/dist/tests/tests/code-first-federation/human/human.module.d.ts +3 -0
- package/dist/tests/tests/code-first-federation/human/human.module.d.ts.map +1 -0
- package/dist/tests/tests/code-first-federation/human/human.module.js +14 -0
- package/dist/tests/tests/code-first-federation/human/human.resolver.d.ts +6 -0
- package/dist/tests/tests/code-first-federation/human/human.resolver.d.ts.map +1 -0
- package/dist/tests/tests/code-first-federation/human/human.resolver.js +34 -0
- package/dist/tests/tests/code-first-federation/main.d.ts +2 -0
- package/dist/tests/tests/code-first-federation/main.d.ts.map +1 -0
- package/dist/tests/tests/code-first-federation/main.js +11 -0
- package/dist/tests/tests/code-first-federation/post/post.entity.d.ts +7 -0
- package/dist/tests/tests/code-first-federation/post/post.entity.d.ts.map +1 -0
- package/dist/tests/tests/code-first-federation/post/post.entity.js +28 -0
- package/dist/tests/tests/code-first-federation/post/post.module.d.ts +3 -0
- package/dist/tests/tests/code-first-federation/post/post.module.d.ts.map +1 -0
- package/dist/tests/tests/code-first-federation/post/post.module.js +16 -0
- package/dist/tests/tests/code-first-federation/post/post.resolver.d.ts +12 -0
- package/dist/tests/tests/code-first-federation/post/post.resolver.d.ts.map +1 -0
- package/dist/tests/tests/code-first-federation/post/post.resolver.js +61 -0
- package/dist/tests/tests/code-first-federation/post/post.service.d.ts +7 -0
- package/dist/tests/tests/code-first-federation/post/post.service.d.ts.map +1 -0
- package/dist/tests/tests/code-first-federation/post/post.service.js +37 -0
- package/dist/tests/tests/code-first-federation/recipe/irecipe.resolver.d.ts +8 -0
- package/dist/tests/tests/code-first-federation/recipe/irecipe.resolver.d.ts.map +1 -0
- package/dist/tests/tests/code-first-federation/recipe/irecipe.resolver.js +21 -0
- package/dist/tests/tests/code-first-federation/recipe/recipe.d.ts +11 -0
- package/dist/tests/tests/code-first-federation/recipe/recipe.d.ts.map +1 -0
- package/dist/tests/tests/code-first-federation/recipe/recipe.js +44 -0
- package/dist/tests/tests/code-first-federation/recipe/recipe.module.d.ts +3 -0
- package/dist/tests/tests/code-first-federation/recipe/recipe.module.d.ts.map +1 -0
- package/dist/tests/tests/code-first-federation/recipe/recipe.module.js +14 -0
- package/dist/tests/tests/code-first-federation/unions/search-result.union.d.ts +4 -0
- package/dist/tests/tests/code-first-federation/unions/search-result.union.d.ts.map +1 -0
- package/dist/tests/tests/code-first-federation/unions/search-result.union.js +20 -0
- package/dist/tests/tests/code-first-federation/user/user.entity.d.ts +7 -0
- package/dist/tests/tests/code-first-federation/user/user.entity.d.ts.map +1 -0
- package/dist/tests/tests/code-first-federation/user/user.entity.js +27 -0
- package/dist/tests/tests/code-first-federation/user/user.module.d.ts +3 -0
- package/dist/tests/tests/code-first-federation/user/user.module.d.ts.map +1 -0
- package/dist/tests/tests/code-first-federation/user/user.module.js +16 -0
- package/dist/tests/tests/code-first-federation/user/user.resolver.d.ts +8 -0
- package/dist/tests/tests/code-first-federation/user/user.resolver.d.ts.map +1 -0
- package/dist/tests/tests/code-first-federation/user/user.resolver.js +27 -0
- package/dist/tests/tests/code-first-register-in/products/product.model.d.ts +5 -0
- package/dist/tests/tests/code-first-register-in/products/product.model.d.ts.map +1 -0
- package/dist/tests/tests/code-first-register-in/products/product.model.js +20 -0
- package/dist/tests/tests/code-first-register-in/products/products.module.d.ts +3 -0
- package/dist/tests/tests/code-first-register-in/products/products.module.d.ts.map +1 -0
- package/dist/tests/tests/code-first-register-in/products/products.module.js +14 -0
- package/dist/tests/tests/code-first-register-in/products/products.resolver.d.ts +5 -0
- package/dist/tests/tests/code-first-register-in/products/products.resolver.d.ts.map +1 -0
- package/dist/tests/tests/code-first-register-in/products/products.resolver.js +21 -0
- package/dist/tests/tests/code-first-register-in/shared/app-info.model.d.ts +4 -0
- package/dist/tests/tests/code-first-register-in/shared/app-info.model.d.ts.map +1 -0
- package/dist/tests/tests/code-first-register-in/shared/app-info.model.js +15 -0
- package/dist/tests/tests/code-first-register-in/users/create-user.input.d.ts +4 -0
- package/dist/tests/tests/code-first-register-in/users/create-user.input.d.ts.map +1 -0
- package/dist/tests/tests/code-first-register-in/users/create-user.input.js +16 -0
- package/dist/tests/tests/code-first-register-in/users/user.model.d.ts +7 -0
- package/dist/tests/tests/code-first-register-in/users/user.model.d.ts.map +1 -0
- package/dist/tests/tests/code-first-register-in/users/user.model.js +25 -0
- package/dist/tests/tests/code-first-register-in/users/users.module.d.ts +3 -0
- package/dist/tests/tests/code-first-register-in/users/users.module.d.ts.map +1 -0
- package/dist/tests/tests/code-first-register-in/users/users.module.js +14 -0
- package/dist/tests/tests/code-first-register-in/users/users.resolver.d.ts +8 -0
- package/dist/tests/tests/code-first-register-in/users/users.resolver.d.ts.map +1 -0
- package/dist/tests/tests/code-first-register-in/users/users.resolver.js +43 -0
- package/dist/tests/tests/duplicate-resolvers/app.module.d.ts +3 -0
- package/dist/tests/tests/duplicate-resolvers/app.module.d.ts.map +1 -0
- package/dist/tests/tests/duplicate-resolvers/app.module.js +27 -0
- package/dist/tests/tests/duplicate-resolvers/module-a/module-a.module.d.ts +3 -0
- package/dist/tests/tests/duplicate-resolvers/module-a/module-a.module.d.ts.map +1 -0
- package/dist/tests/tests/duplicate-resolvers/module-a/module-a.module.js +16 -0
- package/dist/tests/tests/duplicate-resolvers/module-a/user.resolver.d.ts +4 -0
- package/dist/tests/tests/duplicate-resolvers/module-a/user.resolver.d.ts.map +1 -0
- package/dist/tests/tests/duplicate-resolvers/module-a/user.resolver.js +21 -0
- package/dist/tests/tests/duplicate-resolvers/module-b/module-b.module.d.ts +3 -0
- package/dist/tests/tests/duplicate-resolvers/module-b/module-b.module.d.ts.map +1 -0
- package/dist/tests/tests/duplicate-resolvers/module-b/module-b.module.js +16 -0
- package/dist/tests/tests/duplicate-resolvers/module-b/user.resolver.d.ts +4 -0
- package/dist/tests/tests/duplicate-resolvers/module-b/user.resolver.d.ts.map +1 -0
- package/dist/tests/tests/duplicate-resolvers/module-b/user.resolver.js +21 -0
- package/dist/tests/tests/e2e/code-first-federation-caching.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/code-first-federation-caching.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/code-first-federation-caching.spec.js +96 -0
- package/dist/tests/tests/e2e/code-first-federation.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/code-first-federation.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/code-first-federation.spec.js +116 -0
- package/dist/tests/tests/e2e/code-first-inheritance.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/code-first-inheritance.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/code-first-inheritance.spec.js +93 -0
- package/dist/tests/tests/e2e/code-first-register-in.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/code-first-register-in.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/code-first-register-in.spec.js +203 -0
- package/dist/tests/tests/e2e/code-first-schema.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/code-first-schema.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/code-first-schema.spec.js +783 -0
- package/dist/tests/tests/e2e/code-first.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/code-first.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/code-first.spec.js +157 -0
- package/dist/tests/tests/e2e/custom-context.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/custom-context.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/custom-context.spec.js +48 -0
- package/dist/tests/tests/e2e/duplicate-resolvers.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/duplicate-resolvers.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/duplicate-resolvers.spec.js +65 -0
- package/dist/tests/tests/e2e/enum-union-directives.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/enum-union-directives.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/enum-union-directives.spec.js +122 -0
- package/dist/tests/tests/e2e/federation-timestamp-scalar.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/federation-timestamp-scalar.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/federation-timestamp-scalar.spec.js +88 -0
- package/dist/tests/tests/e2e/generated-definitions.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/generated-definitions.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/generated-definitions.spec.js +211 -0
- package/dist/tests/tests/e2e/global-prefix-fastify.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/global-prefix-fastify.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/global-prefix-fastify.spec.js +131 -0
- package/dist/tests/tests/e2e/global-prefix.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/global-prefix.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/global-prefix.spec.js +219 -0
- package/dist/tests/tests/e2e/graphiql-playground.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/graphiql-playground.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/graphiql-playground.spec.js +186 -0
- package/dist/tests/tests/e2e/graphql-async-class.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/graphql-async-class.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/graphql-async-class.spec.js +36 -0
- package/dist/tests/tests/e2e/graphql-async-existing.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/graphql-async-existing.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/graphql-async-existing.spec.js +36 -0
- package/dist/tests/tests/e2e/graphql-async.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/graphql-async.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/graphql-async.spec.js +34 -0
- package/dist/tests/tests/e2e/graphql-fastify.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/graphql-fastify.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/graphql-fastify.spec.js +48 -0
- package/dist/tests/tests/e2e/graphql-federation-async-class.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/graphql-federation-async-class.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/graphql-federation-async-class.spec.js +42 -0
- package/dist/tests/tests/e2e/graphql-federation-async-existing.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/graphql-federation-async-existing.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/graphql-federation-async-existing.spec.js +42 -0
- package/dist/tests/tests/e2e/graphql-federation-async.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/graphql-federation-async.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/graphql-federation-async.spec.js +42 -0
- package/dist/tests/tests/e2e/graphql-federation-fastify.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/graphql-federation-fastify.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/graphql-federation-fastify.spec.js +48 -0
- package/dist/tests/tests/e2e/graphql-federation-schema-host.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/graphql-federation-schema-host.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/graphql-federation-schema-host.spec.js +23 -0
- package/dist/tests/tests/e2e/graphql-federation.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/graphql-federation.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/graphql-federation.spec.js +202 -0
- package/dist/tests/tests/e2e/graphql-gateway-async-class.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/graphql-gateway-async-class.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/graphql-gateway-async-class.spec.js +103 -0
- package/dist/tests/tests/e2e/graphql-gateway-async-existing.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/graphql-gateway-async-existing.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/graphql-gateway-async-existing.spec.js +103 -0
- package/dist/tests/tests/e2e/graphql-gateway-async.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/graphql-gateway-async.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/graphql-gateway-async.spec.js +83 -0
- package/dist/tests/tests/e2e/graphql-gateway-fastify.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/graphql-gateway-fastify.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/graphql-gateway-fastify.spec.js +119 -0
- package/dist/tests/tests/e2e/graphql-gateway-transform-schema.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/graphql-gateway-transform-schema.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/graphql-gateway-transform-schema.spec.js +108 -0
- package/dist/tests/tests/e2e/graphql-gateway.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/graphql-gateway.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/graphql-gateway.spec.js +121 -0
- package/dist/tests/tests/e2e/graphql-request-scoped.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/graphql-request-scoped.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/graphql-request-scoped.spec.js +56 -0
- package/dist/tests/tests/e2e/graphql-sort-auto-schema.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/graphql-sort-auto-schema.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/graphql-sort-auto-schema.spec.js +38 -0
- package/dist/tests/tests/e2e/graphql-sort-schema.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/graphql-sort-schema.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/graphql-sort-schema.spec.js +50 -0
- package/dist/tests/tests/e2e/graphql-transform-auto-schema-file.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/graphql-transform-auto-schema-file.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/graphql-transform-auto-schema-file.spec.js +29 -0
- package/dist/tests/tests/e2e/graphql.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/graphql.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/graphql.spec.js +52 -0
- package/dist/tests/tests/e2e/guards-filters.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/guards-filters.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/guards-filters.spec.js +45 -0
- package/dist/tests/tests/e2e/issue-2940-http-error-status.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/issue-2940-http-error-status.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/issue-2940-http-error-status.spec.js +127 -0
- package/dist/tests/tests/e2e/pipes.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/pipes.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/pipes.spec.js +50 -0
- package/dist/tests/tests/e2e/request-scoped.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/request-scoped.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/request-scoped.spec.js +86 -0
- package/dist/tests/tests/e2e/resolver-registration-methods.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/resolver-registration-methods.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/resolver-registration-methods.spec.js +88 -0
- package/dist/tests/tests/e2e/serialized-graph.spec.d.ts +2 -0
- package/dist/tests/tests/e2e/serialized-graph.spec.d.ts.map +1 -0
- package/dist/tests/tests/e2e/serialized-graph.spec.js +23 -0
- package/dist/tests/tests/generated-definitions/array-property.fixture.d.ts +12 -0
- package/dist/tests/tests/generated-definitions/array-property.fixture.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/array-property.fixture.js +7 -0
- package/dist/tests/tests/generated-definitions/array-property.test-definitions.d.ts +12 -0
- package/dist/tests/tests/generated-definitions/array-property.test-definitions.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/array-property.test-definitions.js +7 -0
- package/dist/tests/tests/generated-definitions/custom-header.fixture.d.ts +2 -0
- package/dist/tests/tests/generated-definitions/custom-header.fixture.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/custom-header.fixture.js +7 -0
- package/dist/tests/tests/generated-definitions/custom-header.test-definitions.d.ts +2 -0
- package/dist/tests/tests/generated-definitions/custom-header.test-definitions.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/custom-header.test-definitions.js +7 -0
- package/dist/tests/tests/generated-definitions/custom-scalar-default-type.fixture.d.ts +2 -0
- package/dist/tests/tests/generated-definitions/custom-scalar-default-type.fixture.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/custom-scalar-default-type.fixture.js +7 -0
- package/dist/tests/tests/generated-definitions/custom-scalar-default-type.test-definitions.d.ts +2 -0
- package/dist/tests/tests/generated-definitions/custom-scalar-default-type.test-definitions.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/custom-scalar-default-type.test-definitions.js +7 -0
- package/dist/tests/tests/generated-definitions/custom-scalar-type-mapping.fixture.d.ts +4 -0
- package/dist/tests/tests/generated-definitions/custom-scalar-type-mapping.fixture.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/custom-scalar-type-mapping.fixture.js +7 -0
- package/dist/tests/tests/generated-definitions/custom-scalar-type-mapping.test-definitions.d.ts +4 -0
- package/dist/tests/tests/generated-definitions/custom-scalar-type-mapping.test-definitions.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/custom-scalar-type-mapping.test-definitions.js +7 -0
- package/dist/tests/tests/generated-definitions/custom-scalar.fixture.d.ts +2 -0
- package/dist/tests/tests/generated-definitions/custom-scalar.fixture.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/custom-scalar.fixture.js +7 -0
- package/dist/tests/tests/generated-definitions/custom-scalar.test-definitions.d.ts +2 -0
- package/dist/tests/tests/generated-definitions/custom-scalar.test-definitions.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/custom-scalar.test-definitions.js +7 -0
- package/dist/tests/tests/generated-definitions/enum-as-type.fixture.d.ts +2 -0
- package/dist/tests/tests/generated-definitions/enum-as-type.fixture.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/enum-as-type.fixture.js +7 -0
- package/dist/tests/tests/generated-definitions/enum-as-type.test-definitions.d.ts +2 -0
- package/dist/tests/tests/generated-definitions/enum-as-type.test-definitions.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/enum-as-type.test-definitions.js +7 -0
- package/dist/tests/tests/generated-definitions/enum.fixture.d.ts +6 -0
- package/dist/tests/tests/generated-definitions/enum.fixture.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/enum.fixture.js +16 -0
- package/dist/tests/tests/generated-definitions/enum.test-definitions.d.ts +6 -0
- package/dist/tests/tests/generated-definitions/enum.test-definitions.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/enum.test-definitions.js +16 -0
- package/dist/tests/tests/generated-definitions/federation-partial-query.fixture.d.ts +6 -0
- package/dist/tests/tests/generated-definitions/federation-partial-query.fixture.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/federation-partial-query.fixture.js +7 -0
- package/dist/tests/tests/generated-definitions/federation-partial-query.test-definitions.d.ts +6 -0
- package/dist/tests/tests/generated-definitions/federation-partial-query.test-definitions.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/federation-partial-query.test-definitions.js +7 -0
- package/dist/tests/tests/generated-definitions/federation-typedef.fixture.d.ts +23 -0
- package/dist/tests/tests/generated-definitions/federation-typedef.fixture.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/federation-typedef.fixture.js +28 -0
- package/dist/tests/tests/generated-definitions/federation-typedef.test-definitions.d.ts +23 -0
- package/dist/tests/tests/generated-definitions/federation-typedef.test-definitions.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/federation-typedef.test-definitions.js +28 -0
- package/dist/tests/tests/generated-definitions/federation.fixture.d.ts +19 -0
- package/dist/tests/tests/generated-definitions/federation.fixture.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/federation.fixture.js +23 -0
- package/dist/tests/tests/generated-definitions/federation.test-definitions.d.ts +19 -0
- package/dist/tests/tests/generated-definitions/federation.test-definitions.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/federation.test-definitions.js +23 -0
- package/dist/tests/tests/generated-definitions/interface-property.fixture.d.ts +10 -0
- package/dist/tests/tests/generated-definitions/interface-property.fixture.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/interface-property.fixture.js +7 -0
- package/dist/tests/tests/generated-definitions/interface-property.test-definitions.d.ts +10 -0
- package/dist/tests/tests/generated-definitions/interface-property.test-definitions.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/interface-property.test-definitions.js +7 -0
- package/dist/tests/tests/generated-definitions/mutation.fixture.d.ts +13 -0
- package/dist/tests/tests/generated-definitions/mutation.fixture.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/mutation.fixture.js +7 -0
- package/dist/tests/tests/generated-definitions/mutation.test-definitions.d.ts +13 -0
- package/dist/tests/tests/generated-definitions/mutation.test-definitions.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/mutation.test-definitions.js +7 -0
- package/dist/tests/tests/generated-definitions/query-skip-args.fixture.d.ts +9 -0
- package/dist/tests/tests/generated-definitions/query-skip-args.fixture.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/query-skip-args.fixture.js +7 -0
- package/dist/tests/tests/generated-definitions/query-skip-args.test-definitions.d.ts +9 -0
- package/dist/tests/tests/generated-definitions/query-skip-args.test-definitions.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/query-skip-args.test-definitions.js +7 -0
- package/dist/tests/tests/generated-definitions/query.fixture.d.ts +9 -0
- package/dist/tests/tests/generated-definitions/query.fixture.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/query.fixture.js +7 -0
- package/dist/tests/tests/generated-definitions/query.test-definitions.d.ts +9 -0
- package/dist/tests/tests/generated-definitions/query.test-definitions.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/query.test-definitions.js +7 -0
- package/dist/tests/tests/generated-definitions/simple-type.fixture.d.ts +10 -0
- package/dist/tests/tests/generated-definitions/simple-type.fixture.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/simple-type.fixture.js +7 -0
- package/dist/tests/tests/generated-definitions/simple-type.test-definitions.d.ts +10 -0
- package/dist/tests/tests/generated-definitions/simple-type.test-definitions.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/simple-type.test-definitions.js +7 -0
- package/dist/tests/tests/generated-definitions/type-name.fixture.d.ts +33 -0
- package/dist/tests/tests/generated-definitions/type-name.fixture.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/type-name.fixture.js +16 -0
- package/dist/tests/tests/generated-definitions/type-name.test-definitions.d.ts +33 -0
- package/dist/tests/tests/generated-definitions/type-name.test-definitions.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/type-name.test-definitions.js +16 -0
- package/dist/tests/tests/generated-definitions/typename.fixture.d.ts +11 -0
- package/dist/tests/tests/generated-definitions/typename.fixture.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/typename.fixture.js +7 -0
- package/dist/tests/tests/generated-definitions/typename.test-definitions.d.ts +11 -0
- package/dist/tests/tests/generated-definitions/typename.test-definitions.d.ts.map +1 -0
- package/dist/tests/tests/generated-definitions/typename.test-definitions.js +7 -0
- package/dist/tests/tests/graphql/app.module.d.ts +3 -0
- package/dist/tests/tests/graphql/app.module.d.ts.map +1 -0
- package/dist/tests/tests/graphql/app.module.js +23 -0
- package/dist/tests/tests/graphql/async-options-class.module.d.ts +3 -0
- package/dist/tests/tests/graphql/async-options-class.module.d.ts.map +1 -0
- package/dist/tests/tests/graphql/async-options-class.module.js +30 -0
- package/dist/tests/tests/graphql/async-options-existing.module.d.ts +3 -0
- package/dist/tests/tests/graphql/async-options-existing.module.d.ts.map +1 -0
- package/dist/tests/tests/graphql/async-options-existing.module.js +25 -0
- package/dist/tests/tests/graphql/async-options.module.d.ts +3 -0
- package/dist/tests/tests/graphql/async-options.module.d.ts.map +1 -0
- package/dist/tests/tests/graphql/async-options.module.js +25 -0
- package/dist/tests/tests/graphql/cats/cats-request-scoped.service.d.ts +10 -0
- package/dist/tests/tests/graphql/cats/cats-request-scoped.service.d.ts.map +1 -0
- package/dist/tests/tests/graphql/cats/cats-request-scoped.service.js +28 -0
- package/dist/tests/tests/graphql/cats/cats.guard.d.ts +5 -0
- package/dist/tests/tests/graphql/cats/cats.guard.d.ts.map +1 -0
- package/dist/tests/tests/graphql/cats/cats.guard.js +16 -0
- package/dist/tests/tests/graphql/cats/cats.module.d.ts +5 -0
- package/dist/tests/tests/graphql/cats/cats.module.d.ts.map +1 -0
- package/dist/tests/tests/graphql/cats/cats.module.js +29 -0
- package/dist/tests/tests/graphql/cats/cats.resolvers.d.ts +13 -0
- package/dist/tests/tests/graphql/cats/cats.resolvers.d.ts.map +1 -0
- package/dist/tests/tests/graphql/cats/cats.resolvers.js +79 -0
- package/dist/tests/tests/graphql/cats/cats.service.d.ts +10 -0
- package/dist/tests/tests/graphql/cats/cats.service.d.ts.map +1 -0
- package/dist/tests/tests/graphql/cats/cats.service.js +28 -0
- package/dist/tests/tests/graphql/cats/interfaces/cat.interface.d.ts +6 -0
- package/dist/tests/tests/graphql/cats/interfaces/cat.interface.d.ts.map +1 -0
- package/dist/tests/tests/graphql/cats/interfaces/cat.interface.js +2 -0
- package/dist/tests/tests/graphql/common/scalars/date.scalar.d.ts +7 -0
- package/dist/tests/tests/graphql/common/scalars/date.scalar.d.ts.map +1 -0
- package/dist/tests/tests/graphql/common/scalars/date.scalar.js +27 -0
- package/dist/tests/tests/graphql/config.module.d.ts +3 -0
- package/dist/tests/tests/graphql/config.module.d.ts.map +1 -0
- package/dist/tests/tests/graphql/config.module.js +15 -0
- package/dist/tests/tests/graphql/config.service.d.ts +5 -0
- package/dist/tests/tests/graphql/config.service.d.ts.map +1 -0
- package/dist/tests/tests/graphql/config.service.js +17 -0
- package/dist/tests/tests/graphql/custom-context/custom-context.module.d.ts +3 -0
- package/dist/tests/tests/graphql/custom-context/custom-context.module.d.ts.map +1 -0
- package/dist/tests/tests/graphql/custom-context/custom-context.module.js +26 -0
- package/dist/tests/tests/graphql/custom-context/custom-context.resolver.d.ts +4 -0
- package/dist/tests/tests/graphql/custom-context/custom-context.resolver.d.ts.map +1 -0
- package/dist/tests/tests/graphql/custom-context/custom-context.resolver.js +21 -0
- package/dist/tests/tests/graphql/global-prefix-async-options-class.module.d.ts +3 -0
- package/dist/tests/tests/graphql/global-prefix-async-options-class.module.d.ts.map +1 -0
- package/dist/tests/tests/graphql/global-prefix-async-options-class.module.js +31 -0
- package/dist/tests/tests/graphql/global-prefix-async-options.module.d.ts +3 -0
- package/dist/tests/tests/graphql/global-prefix-async-options.module.d.ts.map +1 -0
- package/dist/tests/tests/graphql/global-prefix-async-options.module.js +26 -0
- package/dist/tests/tests/graphql/global-prefix.module.d.ts +3 -0
- package/dist/tests/tests/graphql/global-prefix.module.d.ts.map +1 -0
- package/dist/tests/tests/graphql/global-prefix.module.js +24 -0
- package/dist/tests/tests/graphql/graphiql-playground.module.d.ts +12 -0
- package/dist/tests/tests/graphql/graphiql-playground.module.d.ts.map +1 -0
- package/dist/tests/tests/graphql/graphiql-playground.module.js +44 -0
- package/dist/tests/tests/graphql/hello/dto/test.dto.d.ts +5 -0
- package/dist/tests/tests/graphql/hello/dto/test.dto.d.ts.map +1 -0
- package/dist/tests/tests/graphql/hello/dto/test.dto.js +17 -0
- package/dist/tests/tests/graphql/hello/guards/request-scoped.guard.d.ts +10 -0
- package/dist/tests/tests/graphql/hello/guards/request-scoped.guard.d.ts.map +1 -0
- package/dist/tests/tests/graphql/hello/guards/request-scoped.guard.js +24 -0
- package/dist/tests/tests/graphql/hello/hello.module.d.ts +7 -0
- package/dist/tests/tests/graphql/hello/hello.module.d.ts.map +1 -0
- package/dist/tests/tests/graphql/hello/hello.module.js +46 -0
- package/dist/tests/tests/graphql/hello/hello.resolver.d.ts +10 -0
- package/dist/tests/tests/graphql/hello/hello.resolver.d.ts.map +1 -0
- package/dist/tests/tests/graphql/hello/hello.resolver.js +36 -0
- package/dist/tests/tests/graphql/hello/hello.service.d.ts +6 -0
- package/dist/tests/tests/graphql/hello/hello.service.d.ts.map +1 -0
- package/dist/tests/tests/graphql/hello/hello.service.js +19 -0
- package/dist/tests/tests/graphql/hello/interceptors/logging.interceptor.d.ts +10 -0
- package/dist/tests/tests/graphql/hello/interceptors/logging.interceptor.d.ts.map +1 -0
- package/dist/tests/tests/graphql/hello/interceptors/logging.interceptor.js +24 -0
- package/dist/tests/tests/graphql/hello/users/user-by-id.pipe.d.ts +13 -0
- package/dist/tests/tests/graphql/hello/users/user-by-id.pipe.d.ts.map +1 -0
- package/dist/tests/tests/graphql/hello/users/user-by-id.pipe.js +26 -0
- package/dist/tests/tests/graphql/hello/users/users.service.d.ts +11 -0
- package/dist/tests/tests/graphql/hello/users/users.service.d.ts.map +1 -0
- package/dist/tests/tests/graphql/hello/users/users.service.js +27 -0
- package/dist/tests/tests/graphql/main.d.ts +2 -0
- package/dist/tests/tests/graphql/main.d.ts.map +1 -0
- package/dist/tests/tests/graphql/main.js +9 -0
- package/dist/tests/tests/graphql/sort-auto-schema.module.d.ts +3 -0
- package/dist/tests/tests/graphql/sort-auto-schema.module.d.ts.map +1 -0
- package/dist/tests/tests/graphql/sort-auto-schema.module.js +28 -0
- package/dist/tests/tests/graphql/sort-schema.module.d.ts +3 -0
- package/dist/tests/tests/graphql/sort-schema.module.d.ts.map +1 -0
- package/dist/tests/tests/graphql/sort-schema.module.js +24 -0
- package/dist/tests/tests/graphql/transform-auto-schema-file.module.d.ts +3 -0
- package/dist/tests/tests/graphql/transform-auto-schema-file.module.d.ts.map +1 -0
- package/dist/tests/tests/graphql/transform-auto-schema-file.module.js +27 -0
- package/dist/tests/tests/graphql-federation/gateway/config/config.module.d.ts +3 -0
- package/dist/tests/tests/graphql-federation/gateway/config/config.module.d.ts.map +1 -0
- package/dist/tests/tests/graphql-federation/gateway/config/config.module.js +15 -0
- package/dist/tests/tests/graphql-federation/gateway/config/config.service.d.ts +5 -0
- package/dist/tests/tests/graphql-federation/gateway/config/config.service.d.ts.map +1 -0
- package/dist/tests/tests/graphql-federation/gateway/config/config.service.js +19 -0
- package/dist/tests/tests/graphql-federation/gateway/gateway-async-class.module.d.ts +3 -0
- package/dist/tests/tests/graphql-federation/gateway/gateway-async-class.module.d.ts.map +1 -0
- package/dist/tests/tests/graphql-federation/gateway/gateway-async-class.module.js +24 -0
- package/dist/tests/tests/graphql-federation/gateway/gateway-async-existing.module.d.ts +3 -0
- package/dist/tests/tests/graphql-federation/gateway/gateway-async-existing.module.d.ts.map +1 -0
- package/dist/tests/tests/graphql-federation/gateway/gateway-async-existing.module.js +24 -0
- package/dist/tests/tests/graphql-federation/gateway/gateway-async.module.d.ts +3 -0
- package/dist/tests/tests/graphql-federation/gateway/gateway-async.module.d.ts.map +1 -0
- package/dist/tests/tests/graphql-federation/gateway/gateway-async.module.js +26 -0
- package/dist/tests/tests/graphql-federation/gateway/gateway.module.d.ts +3 -0
- package/dist/tests/tests/graphql-federation/gateway/gateway.module.d.ts.map +1 -0
- package/dist/tests/tests/graphql-federation/gateway/gateway.module.js +24 -0
- package/dist/tests/tests/graphql-federation/gateway/supergraph-sdl.d.ts +3 -0
- package/dist/tests/tests/graphql-federation/gateway/supergraph-sdl.d.ts.map +1 -0
- package/dist/tests/tests/graphql-federation/gateway/supergraph-sdl.js +95 -0
- package/dist/tests/tests/graphql-federation/posts-service/federation-posts.module.d.ts +3 -0
- package/dist/tests/tests/graphql-federation/posts-service/federation-posts.module.d.ts.map +1 -0
- package/dist/tests/tests/graphql-federation/posts-service/federation-posts.module.js +27 -0
- package/dist/tests/tests/graphql-federation/posts-service/posts/date.scalar.d.ts +9 -0
- package/dist/tests/tests/graphql-federation/posts-service/posts/date.scalar.d.ts.map +1 -0
- package/dist/tests/tests/graphql-federation/posts-service/posts/date.scalar.js +31 -0
- package/dist/tests/tests/graphql-federation/posts-service/posts/post-type.enum.d.ts +5 -0
- package/dist/tests/tests/graphql-federation/posts-service/posts/post-type.enum.d.ts.map +1 -0
- package/dist/tests/tests/graphql-federation/posts-service/posts/post-type.enum.js +8 -0
- package/dist/tests/tests/graphql-federation/posts-service/posts/posts.interfaces.d.ts +10 -0
- package/dist/tests/tests/graphql-federation/posts-service/posts/posts.interfaces.d.ts.map +1 -0
- package/dist/tests/tests/graphql-federation/posts-service/posts/posts.interfaces.js +2 -0
- package/dist/tests/tests/graphql-federation/posts-service/posts/posts.module.d.ts +3 -0
- package/dist/tests/tests/graphql-federation/posts-service/posts/posts.module.d.ts.map +1 -0
- package/dist/tests/tests/graphql-federation/posts-service/posts/posts.module.js +17 -0
- package/dist/tests/tests/graphql-federation/posts-service/posts/posts.resolvers.d.ts +14 -0
- package/dist/tests/tests/graphql-federation/posts-service/posts/posts.resolvers.d.ts.map +1 -0
- package/dist/tests/tests/graphql-federation/posts-service/posts/posts.resolvers.js +53 -0
- package/dist/tests/tests/graphql-federation/posts-service/posts/posts.service.d.ts +11 -0
- package/dist/tests/tests/graphql-federation/posts-service/posts/posts.service.d.ts.map +1 -0
- package/dist/tests/tests/graphql-federation/posts-service/posts/posts.service.js +41 -0
- package/dist/tests/tests/graphql-federation/posts-service/posts/upper.directive.d.ts +2 -0
- package/dist/tests/tests/graphql-federation/posts-service/posts/upper.directive.d.ts.map +1 -0
- package/dist/tests/tests/graphql-federation/posts-service/posts/upper.directive.js +25 -0
- package/dist/tests/tests/graphql-federation/posts-service/posts/users.resolvers.d.ts +7 -0
- package/dist/tests/tests/graphql-federation/posts-service/posts/users.resolvers.d.ts.map +1 -0
- package/dist/tests/tests/graphql-federation/posts-service/posts/users.resolvers.js +25 -0
- package/dist/tests/tests/graphql-federation/users-service/config/config.module.d.ts +3 -0
- package/dist/tests/tests/graphql-federation/users-service/config/config.module.d.ts.map +1 -0
- package/dist/tests/tests/graphql-federation/users-service/config/config.module.js +15 -0
- package/dist/tests/tests/graphql-federation/users-service/config/config.service.d.ts +5 -0
- package/dist/tests/tests/graphql-federation/users-service/config/config.service.d.ts.map +1 -0
- package/dist/tests/tests/graphql-federation/users-service/config/config.service.js +19 -0
- package/dist/tests/tests/graphql-federation/users-service/federation-users.async-class.module.d.ts +3 -0
- package/dist/tests/tests/graphql-federation/users-service/federation-users.async-class.module.d.ts.map +1 -0
- package/dist/tests/tests/graphql-federation/users-service/federation-users.async-class.module.js +26 -0
- package/dist/tests/tests/graphql-federation/users-service/federation-users.async-existing.module.d.ts +3 -0
- package/dist/tests/tests/graphql-federation/users-service/federation-users.async-existing.module.d.ts.map +1 -0
- package/dist/tests/tests/graphql-federation/users-service/federation-users.async-existing.module.js +26 -0
- package/dist/tests/tests/graphql-federation/users-service/federation-users.async.module.d.ts +3 -0
- package/dist/tests/tests/graphql-federation/users-service/federation-users.async.module.d.ts.map +1 -0
- package/dist/tests/tests/graphql-federation/users-service/federation-users.async.module.js +28 -0
- package/dist/tests/tests/graphql-federation/users-service/federation-users.module.d.ts +3 -0
- package/dist/tests/tests/graphql-federation/users-service/federation-users.module.d.ts.map +1 -0
- package/dist/tests/tests/graphql-federation/users-service/federation-users.module.js +25 -0
- package/dist/tests/tests/graphql-federation/users-service/users/users.interfaces.d.ts +5 -0
- package/dist/tests/tests/graphql-federation/users-service/users/users.interfaces.d.ts.map +1 -0
- package/dist/tests/tests/graphql-federation/users-service/users/users.interfaces.js +2 -0
- package/dist/tests/tests/graphql-federation/users-service/users/users.module.d.ts +3 -0
- package/dist/tests/tests/graphql-federation/users-service/users/users.module.d.ts.map +1 -0
- package/dist/tests/tests/graphql-federation/users-service/users/users.module.js +15 -0
- package/dist/tests/tests/graphql-federation/users-service/users/users.resolvers.d.ts +11 -0
- package/dist/tests/tests/graphql-federation/users-service/users/users.resolvers.d.ts.map +1 -0
- package/dist/tests/tests/graphql-federation/users-service/users/users.resolvers.js +35 -0
- package/dist/tests/tests/graphql-federation/users-service/users/users.service.d.ts +6 -0
- package/dist/tests/tests/graphql-federation/users-service/users/users.service.d.ts.map +1 -0
- package/dist/tests/tests/graphql-federation/users-service/users/users.service.js +22 -0
- package/dist/tests/tests/subscriptions/app/app.module.d.ts +11 -0
- package/dist/tests/tests/subscriptions/app/app.module.d.ts.map +1 -0
- package/dist/tests/tests/subscriptions/app/app.module.js +30 -0
- package/dist/tests/tests/subscriptions/app/auth.guard.d.ts +5 -0
- package/dist/tests/tests/subscriptions/app/auth.guard.d.ts.map +1 -0
- package/dist/tests/tests/subscriptions/app/auth.guard.js +16 -0
- package/dist/tests/tests/subscriptions/app/notification.d.ts +6 -0
- package/dist/tests/tests/subscriptions/app/notification.d.ts.map +1 -0
- package/dist/tests/tests/subscriptions/app/notification.js +29 -0
- package/dist/tests/tests/subscriptions/app/notification.module.d.ts +3 -0
- package/dist/tests/tests/subscriptions/app/notification.module.d.ts.map +1 -0
- package/dist/tests/tests/subscriptions/app/notification.module.js +14 -0
- package/dist/tests/tests/subscriptions/app/notification.resolver.d.ts +10 -0
- package/dist/tests/tests/subscriptions/app/notification.resolver.d.ts.map +1 -0
- package/dist/tests/tests/subscriptions/app/notification.resolver.js +50 -0
- package/dist/tests/tests/subscriptions/async-iterator.spec.d.ts +2 -0
- package/dist/tests/tests/subscriptions/async-iterator.spec.d.ts.map +1 -0
- package/dist/tests/tests/subscriptions/async-iterator.spec.js +48 -0
- package/dist/tests/tests/subscriptions/federation-app/federation-app.module.d.ts +9 -0
- package/dist/tests/tests/subscriptions/federation-app/federation-app.module.d.ts.map +1 -0
- package/dist/tests/tests/subscriptions/federation-app/federation-app.module.js +29 -0
- package/dist/tests/tests/subscriptions/federation-app/notification.d.ts +6 -0
- package/dist/tests/tests/subscriptions/federation-app/notification.d.ts.map +1 -0
- package/dist/tests/tests/subscriptions/federation-app/notification.js +23 -0
- package/dist/tests/tests/subscriptions/federation-app/notification.module.d.ts +3 -0
- package/dist/tests/tests/subscriptions/federation-app/notification.module.d.ts.map +1 -0
- package/dist/tests/tests/subscriptions/federation-app/notification.module.js +14 -0
- package/dist/tests/tests/subscriptions/federation-app/notification.resolver.d.ts +8 -0
- package/dist/tests/tests/subscriptions/federation-app/notification.resolver.d.ts.map +1 -0
- package/dist/tests/tests/subscriptions/federation-app/notification.resolver.js +39 -0
- package/dist/tests/tests/subscriptions/federation-graphql-ws.spec.d.ts +2 -0
- package/dist/tests/tests/subscriptions/federation-graphql-ws.spec.d.ts.map +1 -0
- package/dist/tests/tests/subscriptions/federation-graphql-ws.spec.js +114 -0
- package/dist/tests/tests/subscriptions/graphql-ws.spec.d.ts +2 -0
- package/dist/tests/tests/subscriptions/graphql-ws.spec.d.ts.map +1 -0
- package/dist/tests/tests/subscriptions/graphql-ws.spec.js +238 -0
- package/dist/tests/tests/subscriptions/utils/graphql-ws.link.d.ts +9 -0
- package/dist/tests/tests/subscriptions/utils/graphql-ws.link.d.ts.map +1 -0
- package/dist/tests/tests/subscriptions/utils/graphql-ws.link.js +22 -0
- package/dist/tests/tests/subscriptions/utils/malformed-token.exception.d.ts +4 -0
- package/dist/tests/tests/subscriptions/utils/malformed-token.exception.d.ts.map +1 -0
- package/dist/tests/tests/subscriptions/utils/malformed-token.exception.js +9 -0
- package/dist/tests/tests/utils/assertion-utils.d.ts +4 -0
- package/dist/tests/tests/utils/assertion-utils.d.ts.map +1 -0
- package/dist/tests/tests/utils/assertion-utils.js +11 -0
- package/dist/tests/tests/utils/introspection-schema.utils.d.ts +8 -0
- package/dist/tests/tests/utils/introspection-schema.utils.d.ts.map +1 -0
- package/dist/tests/tests/utils/introspection-schema.utils.js +29 -0
- package/dist/tests/tests/utils/printed-schema-with-cache-control.snapshot.d.ts +2 -0
- package/dist/tests/tests/utils/printed-schema-with-cache-control.snapshot.d.ts.map +1 -0
- package/dist/tests/tests/utils/printed-schema-with-cache-control.snapshot.js +47 -0
- package/dist/tests/tests/utils/printed-schema.snapshot.d.ts +3 -0
- package/dist/tests/tests/utils/printed-schema.snapshot.d.ts.map +1 -0
- package/dist/tests/tests/utils/printed-schema.snapshot.js +217 -0
- package/dist/tests/tsconfig.spec.tsbuildinfo +1 -0
- package/package.json +11 -2
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const graphql_1 = require("@nestjs/graphql");
|
|
5
|
+
const testing_1 = require("@nestjs/testing");
|
|
6
|
+
const fs = tslib_1.__importStar(require("fs"));
|
|
7
|
+
const path = tslib_1.__importStar(require("path"));
|
|
8
|
+
const util = tslib_1.__importStar(require("util"));
|
|
9
|
+
const app_module_1 = require("../code-first/app.module");
|
|
10
|
+
const readFile = util.promisify(fs.readFile);
|
|
11
|
+
const generatedDefinitions = (fileName) => path.join(__dirname, '..', 'generated-definitions', fileName);
|
|
12
|
+
describe('Generated Definitions', () => {
|
|
13
|
+
let app;
|
|
14
|
+
let graphqlFactory;
|
|
15
|
+
beforeEach(async () => {
|
|
16
|
+
const module = await testing_1.Test.createTestingModule({
|
|
17
|
+
imports: [app_module_1.ApplicationModule],
|
|
18
|
+
}).compile();
|
|
19
|
+
app = module.createNestApplication();
|
|
20
|
+
await app.init();
|
|
21
|
+
graphqlFactory = app.get(graphql_1.GraphQLFactory);
|
|
22
|
+
});
|
|
23
|
+
it('should generate interface definitions for types', async () => {
|
|
24
|
+
const typeDefs = await readFile(generatedDefinitions('simple-type.graphql'), 'utf8');
|
|
25
|
+
const outputFile = generatedDefinitions('simple-type.test-definitions.ts');
|
|
26
|
+
await graphqlFactory.generateDefinitions(typeDefs, {
|
|
27
|
+
definitions: {
|
|
28
|
+
path: outputFile,
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
expect(await readFile(generatedDefinitions('simple-type.fixture.ts'), 'utf8')).toBe(await readFile(outputFile, 'utf8'));
|
|
32
|
+
});
|
|
33
|
+
it('should generate properties referencing other interfaces', async () => {
|
|
34
|
+
const typeDefs = await readFile(generatedDefinitions('interface-property.graphql'), 'utf8');
|
|
35
|
+
const outputFile = generatedDefinitions('interface-property.test-definitions.ts');
|
|
36
|
+
await graphqlFactory.generateDefinitions(typeDefs, {
|
|
37
|
+
definitions: {
|
|
38
|
+
path: outputFile,
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
expect(await readFile(generatedDefinitions('interface-property.fixture.ts'), 'utf8')).toBe(await readFile(outputFile, 'utf8'));
|
|
42
|
+
});
|
|
43
|
+
it('should generate array properties with correct optionality', async () => {
|
|
44
|
+
const typeDefs = await readFile(generatedDefinitions('array-property.graphql'), 'utf8');
|
|
45
|
+
const outputFile = generatedDefinitions('array-property.test-definitions.ts');
|
|
46
|
+
await graphqlFactory.generateDefinitions(typeDefs, {
|
|
47
|
+
definitions: {
|
|
48
|
+
path: outputFile,
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
expect(await readFile(generatedDefinitions('array-property.fixture.ts'), 'utf8')).toBe(await readFile(outputFile, 'utf8'));
|
|
52
|
+
});
|
|
53
|
+
it('should generate queries', async () => {
|
|
54
|
+
const typeDefs = await readFile(generatedDefinitions('query.graphql'), 'utf8');
|
|
55
|
+
const outputFile = generatedDefinitions('query.test-definitions.ts');
|
|
56
|
+
await graphqlFactory.generateDefinitions(typeDefs, {
|
|
57
|
+
definitions: {
|
|
58
|
+
path: outputFile,
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
expect(await readFile(generatedDefinitions('query.fixture.ts'), 'utf8')).toBe(await readFile(outputFile, 'utf8'));
|
|
62
|
+
});
|
|
63
|
+
it('should generate queries with methods as fields (skipResolverArgs: true)', async () => {
|
|
64
|
+
const typeDefs = await readFile(generatedDefinitions('query.graphql'), 'utf8');
|
|
65
|
+
const outputFile = generatedDefinitions('query-skip-args.test-definitions.ts');
|
|
66
|
+
await graphqlFactory.generateDefinitions(typeDefs, {
|
|
67
|
+
definitions: {
|
|
68
|
+
path: outputFile,
|
|
69
|
+
skipResolverArgs: true,
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
expect(await readFile(generatedDefinitions('query-skip-args.fixture.ts'), 'utf8')).toBe(await readFile(outputFile, 'utf8'));
|
|
73
|
+
});
|
|
74
|
+
it('should generate mutations', async () => {
|
|
75
|
+
const typeDefs = await readFile(generatedDefinitions('mutation.graphql'), 'utf8');
|
|
76
|
+
const outputFile = generatedDefinitions('mutation.test-definitions.ts');
|
|
77
|
+
await graphqlFactory.generateDefinitions(typeDefs, {
|
|
78
|
+
definitions: {
|
|
79
|
+
path: outputFile,
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
expect(await readFile(generatedDefinitions('mutation.fixture.ts'), 'utf8')).toBe(await readFile(outputFile, 'utf8'));
|
|
83
|
+
});
|
|
84
|
+
it('should generate enums', async () => {
|
|
85
|
+
const typeDefs = await readFile(generatedDefinitions('enum.graphql'), 'utf8');
|
|
86
|
+
const outputFile = generatedDefinitions('enum.test-definitions.ts');
|
|
87
|
+
await graphqlFactory.generateDefinitions(typeDefs, {
|
|
88
|
+
definitions: {
|
|
89
|
+
path: outputFile,
|
|
90
|
+
},
|
|
91
|
+
});
|
|
92
|
+
expect(await readFile(generatedDefinitions('enum.fixture.ts'), 'utf8')).toBe(await readFile(outputFile, 'utf8'));
|
|
93
|
+
});
|
|
94
|
+
it('should generate enums as types', async () => {
|
|
95
|
+
const typeDefs = await readFile(generatedDefinitions('enum-as-type.graphql'), 'utf8');
|
|
96
|
+
const outputFile = generatedDefinitions('enum-as-type.test-definitions.ts');
|
|
97
|
+
await graphqlFactory.generateDefinitions(typeDefs, {
|
|
98
|
+
definitions: {
|
|
99
|
+
path: outputFile,
|
|
100
|
+
enumsAsTypes: true,
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
expect(await readFile(generatedDefinitions('enum-as-type.fixture.ts'), 'utf8')).toBe(await readFile(outputFile, 'utf8'));
|
|
104
|
+
});
|
|
105
|
+
it('should generate custom scalars', async () => {
|
|
106
|
+
const typeDefs = await readFile(generatedDefinitions('custom-scalar.graphql'), 'utf8');
|
|
107
|
+
const outputFile = generatedDefinitions('custom-scalar.test-definitions.ts');
|
|
108
|
+
await graphqlFactory.generateDefinitions(typeDefs, {
|
|
109
|
+
definitions: {
|
|
110
|
+
path: outputFile,
|
|
111
|
+
},
|
|
112
|
+
});
|
|
113
|
+
expect(await readFile(generatedDefinitions('custom-scalar.fixture.ts'), 'utf8')).toBe(await readFile(outputFile, 'utf8'));
|
|
114
|
+
});
|
|
115
|
+
it('should generate custom scalars with a default type', async () => {
|
|
116
|
+
const typeDefs = await readFile(generatedDefinitions('custom-scalar.graphql'), 'utf8');
|
|
117
|
+
const outputFile = generatedDefinitions('custom-scalar-default-type.test-definitions.ts');
|
|
118
|
+
await graphqlFactory.generateDefinitions(typeDefs, {
|
|
119
|
+
definitions: {
|
|
120
|
+
path: outputFile,
|
|
121
|
+
defaultScalarType: 'unknown',
|
|
122
|
+
},
|
|
123
|
+
});
|
|
124
|
+
expect(await readFile(generatedDefinitions('custom-scalar-default-type.fixture.ts'), 'utf8')).toBe(await readFile(outputFile, 'utf8'));
|
|
125
|
+
});
|
|
126
|
+
it('should generate custom scalars with a type mapping', async () => {
|
|
127
|
+
const typeDefs = await readFile(generatedDefinitions('custom-scalar-type-mapping.graphql'), 'utf8');
|
|
128
|
+
const outputFile = generatedDefinitions('custom-scalar-type-mapping.test-definitions.ts');
|
|
129
|
+
await graphqlFactory.generateDefinitions(typeDefs, {
|
|
130
|
+
definitions: {
|
|
131
|
+
path: outputFile,
|
|
132
|
+
customScalarTypeMapping: {
|
|
133
|
+
List: 'string[]',
|
|
134
|
+
Point: '[number, number]',
|
|
135
|
+
DateTime: Date,
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
});
|
|
139
|
+
expect(await readFile(generatedDefinitions('custom-scalar-type-mapping.fixture.ts'), 'utf8')).toBe(await readFile(outputFile, 'utf8'));
|
|
140
|
+
});
|
|
141
|
+
it('should prepend a custom header', async () => {
|
|
142
|
+
const typeDefs = await readFile(generatedDefinitions('custom-header.graphql'), 'utf8');
|
|
143
|
+
const outputFile = generatedDefinitions('custom-header.test-definitions.ts');
|
|
144
|
+
await graphqlFactory.generateDefinitions(typeDefs, {
|
|
145
|
+
definitions: {
|
|
146
|
+
path: outputFile,
|
|
147
|
+
additionalHeader: '/* Put anything here you like */',
|
|
148
|
+
},
|
|
149
|
+
});
|
|
150
|
+
expect(await readFile(generatedDefinitions('custom-header.fixture.ts'), 'utf8')).toBe(await readFile(outputFile, 'utf8'));
|
|
151
|
+
});
|
|
152
|
+
it('should generate for a federated graph', async () => {
|
|
153
|
+
const outputFile = generatedDefinitions('federation.test-definitions.ts');
|
|
154
|
+
const factory = new graphql_1.GraphQLFederationDefinitionsFactory();
|
|
155
|
+
await factory.generate({
|
|
156
|
+
typePaths: [generatedDefinitions('federation.graphql')],
|
|
157
|
+
path: outputFile,
|
|
158
|
+
outputAs: 'class',
|
|
159
|
+
});
|
|
160
|
+
expect(await readFile(generatedDefinitions('federation.fixture.ts'), 'utf8')).toBe(await readFile(outputFile, 'utf8'));
|
|
161
|
+
});
|
|
162
|
+
it('should generate for a federated graph with typeDef', async () => {
|
|
163
|
+
const outputFile = generatedDefinitions('federation-typedef.test-definitions.ts');
|
|
164
|
+
const factory = new graphql_1.GraphQLFederationDefinitionsFactory();
|
|
165
|
+
await factory.generate({
|
|
166
|
+
typePaths: [generatedDefinitions('federation-typedef.graphql')],
|
|
167
|
+
typeDefs: `enum Animal {
|
|
168
|
+
DOG
|
|
169
|
+
CAT
|
|
170
|
+
}`,
|
|
171
|
+
path: outputFile,
|
|
172
|
+
outputAs: 'class',
|
|
173
|
+
});
|
|
174
|
+
expect(await readFile(generatedDefinitions('federation-typedef.fixture.ts'), 'utf8')).toBe(await readFile(outputFile, 'utf8'));
|
|
175
|
+
});
|
|
176
|
+
it('should generate with __typename field for each object type', async () => {
|
|
177
|
+
const typeDefs = await readFile(generatedDefinitions('typename.graphql'), 'utf8');
|
|
178
|
+
const outputFile = generatedDefinitions('typename.test-definitions.ts');
|
|
179
|
+
await graphqlFactory.generateDefinitions(typeDefs, {
|
|
180
|
+
definitions: {
|
|
181
|
+
path: outputFile,
|
|
182
|
+
emitTypenameField: true,
|
|
183
|
+
},
|
|
184
|
+
});
|
|
185
|
+
expect(await readFile(generatedDefinitions('typename.fixture.ts'), 'utf8')).toBe(await readFile(outputFile, 'utf8'));
|
|
186
|
+
});
|
|
187
|
+
afterEach(async () => {
|
|
188
|
+
await app.close();
|
|
189
|
+
});
|
|
190
|
+
it('should generate for a federated graph with partial query definition', async () => {
|
|
191
|
+
const outputFile = generatedDefinitions('federation-partial-query.test-definitions.ts');
|
|
192
|
+
const factory = new graphql_1.GraphQLFederationDefinitionsFactory();
|
|
193
|
+
await factory.generate({
|
|
194
|
+
typePaths: [generatedDefinitions('federation-partial-query.graphql')],
|
|
195
|
+
path: outputFile,
|
|
196
|
+
outputAs: 'interface',
|
|
197
|
+
});
|
|
198
|
+
expect(await readFile(generatedDefinitions('federation-partial-query.fixture.ts'), 'utf8')).toBe(await readFile(outputFile, 'utf8'));
|
|
199
|
+
});
|
|
200
|
+
it('should apply typeName function to transform type names', async () => {
|
|
201
|
+
const typeDefs = await readFile(generatedDefinitions('type-name.graphql'), 'utf8');
|
|
202
|
+
const outputFile = generatedDefinitions('type-name.test-definitions.ts');
|
|
203
|
+
await graphqlFactory.generateDefinitions(typeDefs, {
|
|
204
|
+
definitions: {
|
|
205
|
+
path: outputFile,
|
|
206
|
+
typeName: (name) => `${name}Schema`,
|
|
207
|
+
},
|
|
208
|
+
});
|
|
209
|
+
expect(await readFile(generatedDefinitions('type-name.fixture.ts'), 'utf8')).toBe(await readFile(outputFile, 'utf8'));
|
|
210
|
+
});
|
|
211
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global-prefix-fastify.spec.d.ts","sourceRoot":"","sources":["../../../../tests/e2e/global-prefix-fastify.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const platform_fastify_1 = require("@nestjs/platform-fastify");
|
|
5
|
+
const testing_1 = require("@nestjs/testing");
|
|
6
|
+
const supertest_1 = tslib_1.__importDefault(require("supertest"));
|
|
7
|
+
const global_prefix_module_1 = require("../graphql/global-prefix.module");
|
|
8
|
+
describe('GraphQL Fastify (global prefix)', () => {
|
|
9
|
+
let app;
|
|
10
|
+
describe('Global prefix with starting slash', () => {
|
|
11
|
+
beforeEach(async () => {
|
|
12
|
+
const module = await testing_1.Test.createTestingModule({
|
|
13
|
+
imports: [global_prefix_module_1.GlobalPrefixModule],
|
|
14
|
+
}).compile();
|
|
15
|
+
app = module.createNestApplication(new platform_fastify_1.FastifyAdapter());
|
|
16
|
+
app.setGlobalPrefix('/api/v1');
|
|
17
|
+
await app.init();
|
|
18
|
+
await app.getHttpAdapter().getInstance().ready();
|
|
19
|
+
});
|
|
20
|
+
it('should return query result', () => {
|
|
21
|
+
return (0, supertest_1.default)(app.getHttpServer())
|
|
22
|
+
.post('/api/v1/graphql')
|
|
23
|
+
.send({
|
|
24
|
+
operationName: null,
|
|
25
|
+
variables: {},
|
|
26
|
+
query: `
|
|
27
|
+
{
|
|
28
|
+
getCats {
|
|
29
|
+
id,
|
|
30
|
+
color,
|
|
31
|
+
weight
|
|
32
|
+
}
|
|
33
|
+
}`,
|
|
34
|
+
})
|
|
35
|
+
.expect(200, {
|
|
36
|
+
data: {
|
|
37
|
+
getCats: [
|
|
38
|
+
{
|
|
39
|
+
id: 1,
|
|
40
|
+
color: 'black',
|
|
41
|
+
weight: 5,
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
afterEach(async () => {
|
|
48
|
+
await app.close();
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
describe('Global prefix without starting slash', () => {
|
|
52
|
+
beforeEach(async () => {
|
|
53
|
+
const module = await testing_1.Test.createTestingModule({
|
|
54
|
+
imports: [global_prefix_module_1.GlobalPrefixModule],
|
|
55
|
+
}).compile();
|
|
56
|
+
app = module.createNestApplication();
|
|
57
|
+
app.setGlobalPrefix('api/v1');
|
|
58
|
+
await app.init();
|
|
59
|
+
});
|
|
60
|
+
it('should return query result', () => {
|
|
61
|
+
return (0, supertest_1.default)(app.getHttpServer())
|
|
62
|
+
.post('/api/v1/graphql')
|
|
63
|
+
.send({
|
|
64
|
+
operationName: null,
|
|
65
|
+
variables: {},
|
|
66
|
+
query: `
|
|
67
|
+
{
|
|
68
|
+
getCats {
|
|
69
|
+
id,
|
|
70
|
+
color,
|
|
71
|
+
weight
|
|
72
|
+
}
|
|
73
|
+
}`,
|
|
74
|
+
})
|
|
75
|
+
.expect(200, {
|
|
76
|
+
data: {
|
|
77
|
+
getCats: [
|
|
78
|
+
{
|
|
79
|
+
id: 1,
|
|
80
|
+
color: 'black',
|
|
81
|
+
weight: 5,
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
afterEach(async () => {
|
|
88
|
+
await app.close();
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
describe('Global prefix with ending slash', () => {
|
|
92
|
+
beforeEach(async () => {
|
|
93
|
+
const module = await testing_1.Test.createTestingModule({
|
|
94
|
+
imports: [global_prefix_module_1.GlobalPrefixModule],
|
|
95
|
+
}).compile();
|
|
96
|
+
app = module.createNestApplication();
|
|
97
|
+
app.setGlobalPrefix('/api/v1/');
|
|
98
|
+
await app.init();
|
|
99
|
+
});
|
|
100
|
+
it('should return query result', () => {
|
|
101
|
+
return (0, supertest_1.default)(app.getHttpServer())
|
|
102
|
+
.post('/api/v1/graphql')
|
|
103
|
+
.send({
|
|
104
|
+
operationName: null,
|
|
105
|
+
variables: {},
|
|
106
|
+
query: `
|
|
107
|
+
{
|
|
108
|
+
getCats {
|
|
109
|
+
id,
|
|
110
|
+
color,
|
|
111
|
+
weight
|
|
112
|
+
}
|
|
113
|
+
}`,
|
|
114
|
+
})
|
|
115
|
+
.expect(200, {
|
|
116
|
+
data: {
|
|
117
|
+
getCats: [
|
|
118
|
+
{
|
|
119
|
+
id: 1,
|
|
120
|
+
color: 'black',
|
|
121
|
+
weight: 5,
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
},
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
afterEach(async () => {
|
|
128
|
+
await app.close();
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global-prefix.spec.d.ts","sourceRoot":"","sources":["../../../../tests/e2e/global-prefix.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const core_1 = require("@nestjs/core");
|
|
5
|
+
const platform_express_1 = require("@nestjs/platform-express");
|
|
6
|
+
const testing_1 = require("@nestjs/testing");
|
|
7
|
+
const supertest_1 = tslib_1.__importDefault(require("supertest"));
|
|
8
|
+
const global_prefix_async_options_class_module_1 = require("../graphql/global-prefix-async-options-class.module");
|
|
9
|
+
const global_prefix_async_options_module_1 = require("../graphql/global-prefix-async-options.module");
|
|
10
|
+
const global_prefix_module_1 = require("../graphql/global-prefix.module");
|
|
11
|
+
describe('GraphQL (global prefix)', () => {
|
|
12
|
+
let app;
|
|
13
|
+
describe('Global prefix with starting slash', () => {
|
|
14
|
+
beforeEach(async () => {
|
|
15
|
+
const module = await testing_1.Test.createTestingModule({
|
|
16
|
+
imports: [global_prefix_module_1.GlobalPrefixModule],
|
|
17
|
+
}).compile();
|
|
18
|
+
app = module.createNestApplication(new platform_express_1.ExpressAdapter(), {
|
|
19
|
+
abortOnError: false,
|
|
20
|
+
});
|
|
21
|
+
app.setGlobalPrefix('/api/v1');
|
|
22
|
+
await app.init();
|
|
23
|
+
});
|
|
24
|
+
it('should return query result', () => {
|
|
25
|
+
return (0, supertest_1.default)(app.getHttpServer())
|
|
26
|
+
.post('/api/v1/graphql')
|
|
27
|
+
.send({
|
|
28
|
+
operationName: null,
|
|
29
|
+
variables: {},
|
|
30
|
+
query: `
|
|
31
|
+
{
|
|
32
|
+
getCats {
|
|
33
|
+
id,
|
|
34
|
+
color,
|
|
35
|
+
weight
|
|
36
|
+
}
|
|
37
|
+
}`,
|
|
38
|
+
})
|
|
39
|
+
.expect(200, {
|
|
40
|
+
data: {
|
|
41
|
+
getCats: [
|
|
42
|
+
{
|
|
43
|
+
id: 1,
|
|
44
|
+
color: 'black',
|
|
45
|
+
weight: 5,
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
afterEach(async () => {
|
|
52
|
+
await app.close();
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
describe('Global prefix without starting slash', () => {
|
|
56
|
+
beforeEach(async () => {
|
|
57
|
+
const module = await testing_1.Test.createTestingModule({
|
|
58
|
+
imports: [global_prefix_module_1.GlobalPrefixModule],
|
|
59
|
+
}).compile();
|
|
60
|
+
app = module.createNestApplication(new platform_express_1.ExpressAdapter(), {
|
|
61
|
+
abortOnError: false,
|
|
62
|
+
});
|
|
63
|
+
app.setGlobalPrefix('api/v1');
|
|
64
|
+
await app.init();
|
|
65
|
+
});
|
|
66
|
+
it('should return query result', () => {
|
|
67
|
+
return (0, supertest_1.default)(app.getHttpServer())
|
|
68
|
+
.post('/api/v1/graphql')
|
|
69
|
+
.send({
|
|
70
|
+
operationName: null,
|
|
71
|
+
variables: {},
|
|
72
|
+
query: `
|
|
73
|
+
{
|
|
74
|
+
getCats {
|
|
75
|
+
id,
|
|
76
|
+
color,
|
|
77
|
+
weight
|
|
78
|
+
}
|
|
79
|
+
}`,
|
|
80
|
+
})
|
|
81
|
+
.expect(200, {
|
|
82
|
+
data: {
|
|
83
|
+
getCats: [
|
|
84
|
+
{
|
|
85
|
+
id: 1,
|
|
86
|
+
color: 'black',
|
|
87
|
+
weight: 5,
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
},
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
afterEach(async () => {
|
|
94
|
+
await app.close();
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
describe('Global prefix with ending slash', () => {
|
|
98
|
+
beforeEach(async () => {
|
|
99
|
+
const module = await testing_1.Test.createTestingModule({
|
|
100
|
+
imports: [global_prefix_module_1.GlobalPrefixModule],
|
|
101
|
+
}).compile();
|
|
102
|
+
app = module.createNestApplication(new platform_express_1.ExpressAdapter(), {
|
|
103
|
+
abortOnError: false,
|
|
104
|
+
});
|
|
105
|
+
app.setGlobalPrefix('/api/v1/');
|
|
106
|
+
await app.init();
|
|
107
|
+
});
|
|
108
|
+
it('should return query result', () => {
|
|
109
|
+
return (0, supertest_1.default)(app.getHttpServer())
|
|
110
|
+
.post('/api/v1/graphql')
|
|
111
|
+
.send({
|
|
112
|
+
operationName: null,
|
|
113
|
+
variables: {},
|
|
114
|
+
query: `
|
|
115
|
+
{
|
|
116
|
+
getCats {
|
|
117
|
+
id,
|
|
118
|
+
color,
|
|
119
|
+
weight
|
|
120
|
+
}
|
|
121
|
+
}`,
|
|
122
|
+
})
|
|
123
|
+
.expect(200, {
|
|
124
|
+
data: {
|
|
125
|
+
getCats: [
|
|
126
|
+
{
|
|
127
|
+
id: 1,
|
|
128
|
+
color: 'black',
|
|
129
|
+
weight: 5,
|
|
130
|
+
},
|
|
131
|
+
],
|
|
132
|
+
},
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
afterEach(async () => {
|
|
136
|
+
await app.close();
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
describe('Global prefix (async configuration)', () => {
|
|
140
|
+
beforeEach(async () => {
|
|
141
|
+
app = await core_1.NestFactory.create(global_prefix_async_options_module_1.GlobalPrefixAsyncOptionsModule, {
|
|
142
|
+
logger: false,
|
|
143
|
+
abortOnError: false,
|
|
144
|
+
});
|
|
145
|
+
app.setGlobalPrefix('/api/v1/');
|
|
146
|
+
await app.init();
|
|
147
|
+
});
|
|
148
|
+
it('should return query result', () => {
|
|
149
|
+
return (0, supertest_1.default)(app.getHttpServer())
|
|
150
|
+
.post('/api/v1/graphql')
|
|
151
|
+
.send({
|
|
152
|
+
operationName: null,
|
|
153
|
+
variables: {},
|
|
154
|
+
query: `
|
|
155
|
+
{
|
|
156
|
+
getCats {
|
|
157
|
+
id,
|
|
158
|
+
color,
|
|
159
|
+
weight
|
|
160
|
+
}
|
|
161
|
+
}`,
|
|
162
|
+
})
|
|
163
|
+
.expect(200, {
|
|
164
|
+
data: {
|
|
165
|
+
getCats: [
|
|
166
|
+
{
|
|
167
|
+
id: 1,
|
|
168
|
+
color: 'black',
|
|
169
|
+
weight: 5,
|
|
170
|
+
},
|
|
171
|
+
],
|
|
172
|
+
},
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
afterEach(async () => {
|
|
176
|
+
await app.close();
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
describe('Global prefix (async class)', () => {
|
|
180
|
+
beforeEach(async () => {
|
|
181
|
+
app = await core_1.NestFactory.create(global_prefix_async_options_class_module_1.GlobalPrefixAsyncOptionsClassModule, {
|
|
182
|
+
logger: false,
|
|
183
|
+
abortOnError: false,
|
|
184
|
+
});
|
|
185
|
+
app.setGlobalPrefix('/api/v1/');
|
|
186
|
+
await app.init();
|
|
187
|
+
});
|
|
188
|
+
it('should return query result', () => {
|
|
189
|
+
return (0, supertest_1.default)(app.getHttpServer())
|
|
190
|
+
.post('/api/v1/graphql')
|
|
191
|
+
.send({
|
|
192
|
+
operationName: null,
|
|
193
|
+
variables: {},
|
|
194
|
+
query: `
|
|
195
|
+
{
|
|
196
|
+
getCats {
|
|
197
|
+
id,
|
|
198
|
+
color,
|
|
199
|
+
weight
|
|
200
|
+
}
|
|
201
|
+
}`,
|
|
202
|
+
})
|
|
203
|
+
.expect(200, {
|
|
204
|
+
data: {
|
|
205
|
+
getCats: [
|
|
206
|
+
{
|
|
207
|
+
id: 1,
|
|
208
|
+
color: 'black',
|
|
209
|
+
weight: 5,
|
|
210
|
+
},
|
|
211
|
+
],
|
|
212
|
+
},
|
|
213
|
+
});
|
|
214
|
+
});
|
|
215
|
+
afterEach(async () => {
|
|
216
|
+
await app.close();
|
|
217
|
+
});
|
|
218
|
+
});
|
|
219
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphiql-playground.spec.d.ts","sourceRoot":"","sources":["../../../../tests/e2e/graphiql-playground.spec.ts"],"names":[],"mappings":""}
|