graphql.services.yml in GraphQL 8.3
File
graphql.services.yml
View source
- parameters:
- graphql.config:
- # Development mode:
- #
- # Enables debugging mode and disables field security and caching.
- #
- # When enabled, all fields can be resolved without restrictions
- # and the caching strategy of the schema and query results is
- # disabled entirely.
- #
- # @default false
- development: false
-
- services:
- # Check access for executing graphql queries.
- access_check.graphql.query:
- class: Drupal\graphql\Access\QueryAccessCheck
- arguments: ['@request_stack']
- tags:
- - { name: access_check, applies_to: _graphql_query_access }
-
- # Logger channel for graphql related logging.
- logger.channel.graphql:
- parent: logger.channel_base
- arguments: ['graphql']
-
- # Cache bin for graphql plugin definitions.
- cache.graphql.definitions:
- class: Drupal\Core\Cache\CacheBackendInterface
- tags:
- - { name: cache.bin }
- factory: cache_factory:get
- arguments: [graphql_definitions]
-
- # Cache bin for graphql query results.
- cache.graphql.results:
- class: Drupal\Core\Cache\CacheBackendInterface
- tags:
- - { name: cache.bin }
- factory: cache_factory:get
- arguments: [graphql_results]
-
- # Schema and processor factory.
- graphql.query_processor:
- class: Drupal\graphql\GraphQL\Execution\QueryProcessor
- arguments:
- - '@cache_contexts_manager'
- - '@plugin.manager.graphql.schema'
- - '@cache.graphql.results'
- - '@request_stack'
-
- # Query map provider using the composite pattern.
- graphql.query_provider:
- class: Drupal\graphql\GraphQL\QueryProvider\QueryProvider
- tags:
- - { name: service_collector, tag: graphql_query_provider, call: addQueryProvider }
- graphql.query_provider.query_map.entity:
- class: Drupal\graphql\GraphQL\QueryProvider\EntityQueryMapQueryProvider
- arguments: ['@entity_type.manager']
- tags:
- - { name: graphql_query_provider }
- graphql.query_provider.query_map.json:
- class: Drupal\graphql\GraphQL\QueryProvider\JsonQueryMapQueryProvider
- arguments: ['@cache.default', '@config.factory']
- tags:
- - { name: graphql_query_provider }
-
- graphql.query_routes:
- class: Drupal\graphql\Routing\QueryRoutes
- arguments: ['@plugin.manager.graphql.schema', '@authentication_collector']
- tags:
- - { name: 'event_subscriber' }
-
- # Deny caching in the dynamic page cache.
- graphql.request_policy.deny_query:
- class: Drupal\graphql\Cache\RequestPolicy\DenyQuery
- tags:
- - { name: dynamic_page_cache_request_policy }
-
- # Upcasting for graphql query request parameters.
- graphql.route_enhancer.query:
- class: Drupal\graphql\Routing\QueryRouteEnhancer
- arguments: ['@graphql.query_provider']
- tags:
- - { name: route_enhancer }
-
- # Schema introspection service.
- graphql.introspection:
- class: Drupal\graphql\GraphQL\Utility\Introspection
- arguments: ['@graphql.query_processor']
-
- # Support for subrequests.
- graphql.subrequest_subscriber:
- class: Drupal\graphql\EventSubscriber\SubrequestSubscriber
- tags:
- - { name: event_subscriber }
-
- # Context repository for fetching contexts from sub-requests.
- graphql.context_repository:
- class: Drupal\graphql\GraphQL\Context\ContextRepository
- tags:
- - { name: service_collector, tag: context_provider, call: addContextProvider }
-
- # Combines all type plugin managers.
- graphql.type_manager_aggregator:
- class: Drupal\graphql\Plugin\TypePluginManagerAggregator
- tags:
- - { name: service_collector, tag: graphql_type_manager, call: addTypeManager }
-
- # Plugin manager for schemas
- plugin.manager.graphql.schema:
- class: Drupal\graphql\Plugin\SchemaPluginManager
- arguments:
- - 'Plugin/GraphQL/Schemas'
- - '@container.namespaces'
- - '@module_handler'
- - '@cache.graphql.definitions'
- - '\Drupal\graphql\Plugin\SchemaPluginInterface'
- - '\Drupal\graphql\Annotation\GraphQLSchema'
- - '%graphql.config%'
-
- # Plugin manager for fields.
- plugin.manager.graphql.field:
- class: Drupal\graphql\Plugin\FieldPluginManager
- arguments:
- - 'Plugin/GraphQL/Fields'
- - '@container.namespaces'
- - '@module_handler'
- - '@cache.graphql.definitions'
- - '\Drupal\graphql\Plugin\FieldPluginInterface'
- - '\Drupal\graphql\Annotation\GraphQLField'
- - '%graphql.config%'
-
- # Plugin manager for mutations.
- plugin.manager.graphql.mutation:
- class: Drupal\graphql\Plugin\MutationPluginManager
- arguments:
- - 'Plugin/GraphQL/Mutations'
- - '@container.namespaces'
- - '@module_handler'
- - '@cache.graphql.definitions'
- - '\Drupal\graphql\Plugin\MutationPluginInterface'
- - '\Drupal\graphql\Annotation\GraphQLMutation'
- - '%graphql.config%'
-
- plugin.manager.graphql.subscription:
- class: Drupal\graphql\Plugin\SubscriptionPluginManager
- arguments:
- - 'Plugin/GraphQL/Subscriptions'
- - '@container.namespaces'
- - '@module_handler'
- - '@cache.graphql.definitions'
- - '\Drupal\graphql\Plugin\SubscriptionPluginInterface'
- - '\Drupal\graphql\Annotation\GraphQLSubscription'
- - '%graphql.config%'
-
- # Plugin manager implementations for schema types.
- plugin.manager.graphql.union:
- class: Drupal\graphql\Plugin\TypePluginManager
- tags:
- - { name: graphql_type_manager }
- arguments:
- - 'Plugin/GraphQL/UnionTypes'
- - '@container.namespaces'
- - '@module_handler'
- - '@cache.graphql.definitions'
- - '\Drupal\graphql\Plugin\GraphQL\Unions\UnionTypePluginBase'
- - '\Drupal\graphql\Annotation\GraphQLUnionType'
- - 'union_types'
- - '%graphql.config%'
- plugin.manager.graphql.interface:
- class: Drupal\graphql\Plugin\TypePluginManager
- tags:
- - { name: graphql_type_manager }
- arguments:
- - 'Plugin/GraphQL/Interfaces'
- - '@container.namespaces'
- - '@module_handler'
- - '@cache.graphql.definitions'
- - '\Drupal\graphql\Plugin\GraphQL\Interfaces\InterfacePluginBase'
- - '\Drupal\graphql\Annotation\GraphQLInterface'
- - 'interfaces'
- - '%graphql.config%'
- plugin.manager.graphql.type:
- class: Drupal\graphql\Plugin\TypePluginManager
- tags:
- - { name: graphql_type_manager }
- arguments:
- - 'Plugin/GraphQL/Types'
- - '@container.namespaces'
- - '@module_handler'
- - '@cache.graphql.definitions'
- - '\Drupal\graphql\Plugin\GraphQL\Types\TypePluginBase'
- - '\Drupal\graphql\Annotation\GraphQLType'
- - 'types'
- - '%graphql.config%'
- plugin.manager.graphql.input:
- class: Drupal\graphql\Plugin\TypePluginManager
- tags:
- - { name: graphql_type_manager }
- arguments:
- - 'Plugin/GraphQL/InputTypes'
- - '@container.namespaces'
- - '@module_handler'
- - '@cache.graphql.definitions'
- - '\Drupal\graphql\Plugin\GraphQL\InputTypes\InputTypePluginBase'
- - '\Drupal\graphql\Annotation\GraphQLInputType'
- - 'input_types'
- - '%graphql.config%'
- plugin.manager.graphql.scalar:
- class: Drupal\graphql\Plugin\TypePluginManager
- tags:
- - { name: graphql_type_manager }
- arguments:
- - 'Plugin/GraphQL/Scalars'
- - '@container.namespaces'
- - '@module_handler'
- - '@cache.graphql.definitions'
- - '\Drupal\graphql\Plugin\GraphQL\Scalars\ScalarPluginBase'
- - '\Drupal\graphql\Annotation\GraphQLScalar'
- - 'scalars'
- - '%graphql.config%'
- plugin.manager.graphql.enum:
- class: Drupal\graphql\Plugin\TypePluginManager
- tags:
- - { name: graphql_type_manager }
- arguments:
- - 'Plugin/GraphQL/Enums'
- - '@container.namespaces'
- - '@module_handler'
- - '@cache.graphql.definitions'
- - '\Drupal\graphql\Plugin\GraphQL\Enums\EnumPluginBase'
- - '\Drupal\graphql\Annotation\GraphQLEnum'
- - 'enums'
- - '%graphql.config%'
-
- # Voyager.
- graphql.voyager.page_display_variant_subscriber:
- class: Drupal\graphql\EventSubscriber\VoyagerPageDisplayVariantSubscriber
- tags:
- - { name: event_subscriber }
- graphql.voyager.routes:
- class: Drupal\graphql\Routing\VoyagerRoutes
- arguments: ['@plugin.manager.graphql.schema']
- tags:
- - { name: 'event_subscriber' }
-
- # Explorer.
- graphql.graphiql.page_display_variant_subscriber:
- class: Drupal\graphql\EventSubscriber\ExplorerPageDisplayVariantSubscriber
- tags:
- - { name: event_subscriber }
- graphql.graphiql.explorer_routes:
- class: Drupal\graphql\Routing\ExplorerRoutes
- arguments: ['@plugin.manager.graphql.schema']
- tags:
- - { name: 'event_subscriber' }
-
- # Buffers.
- graphql.buffer.entity:
- class: Drupal\graphql\GraphQL\Buffers\EntityBuffer
- arguments: ['@entity_type.manager']
- graphql.buffer.subrequest:
- class: Drupal\graphql\GraphQL\Buffers\SubRequestBuffer
- arguments: ['@http_kernel', '@request_stack']
-
- graphql.language_context:
- class: Drupal\graphql\GraphQLLanguageContext
- arguments: ['@language_manager', '@string_translation']
-
- graphql.config_factory_override:
- class: Drupal\graphql\Config\GraphQLConfigOverrides
- arguments: ['@config.storage', '@?plugin.manager.language_negotiation_method']
- tags:
- - { name: config.factory.override, priority: -253 }