You are here

graphql.services.yml in GraphQL 8.4

File

graphql.services.yml
View source
  1. parameters:
  2. graphql.config:
  3. # Development mode:
  4. #
  5. # Enables debugging mode and disables field security and caching.
  6. #
  7. # When enabled, all fields can be resolved without restrictions
  8. # and the caching strategy of the schema and query results is
  9. # disabled entirely.
  10. #
  11. # @default false
  12. development: false
  13. services:
  14. # Check access for executing graphql queries.
  15. access_check.graphql.query:
  16. class: Drupal\graphql\Access\QueryAccessCheck
  17. arguments: ['@request_stack']
  18. tags:
  19. - { name: access_check, applies_to: _graphql_query_access }
  20. access_check.graphql.explorer:
  21. class: Drupal\graphql\Access\ExplorerAccessCheck
  22. tags:
  23. - { name: access_check, applies_to: _graphql_explorer_access }
  24. access_check.graphql.voyager:
  25. class: Drupal\graphql\Access\VoyagerAccessCheck
  26. tags:
  27. - { name: access_check, applies_to: _graphql_voyager_access }
  28. # Logger channel for graphql related logging.
  29. logger.channel.graphql:
  30. parent: logger.channel_base
  31. arguments: ['graphql']
  32. # Allows to statically define cache contexts.
  33. # TODO: This seems to be a missing feature in core.
  34. cache_context.static:
  35. class: Drupal\graphql\Cache\Context\StaticCacheContext
  36. tags:
  37. - { name: cache.context }
  38. # Cache bin for the parsed sdl ast.
  39. cache.graphql.ast:
  40. class: Drupal\Core\Cache\CacheBackendInterface
  41. tags:
  42. - { name: cache.bin }
  43. factory: cache_factory:get
  44. arguments: [graphql_ast]
  45. # Cache bin for graphql plugin definitions.
  46. cache.graphql.definitions:
  47. class: Drupal\Core\Cache\CacheBackendInterface
  48. tags:
  49. - { name: cache.bin }
  50. factory: cache_factory:get
  51. arguments: [graphql_definitions]
  52. # Cache bin for graphql query results.
  53. cache.graphql.results:
  54. class: Drupal\Core\Cache\CacheBackendInterface
  55. tags:
  56. - { name: cache.bin }
  57. factory: cache_factory:get
  58. arguments: [graphql_results]
  59. # Executor factory.
  60. graphql.executor:
  61. class: Drupal\graphql\GraphQL\Execution\ExecutorFactory
  62. arguments: ['@service_container']
  63. # Upcasting for graphql query request parameters.
  64. graphql.route_enhancer.query:
  65. class: Drupal\graphql\Routing\QueryRouteEnhancer
  66. arguments: ['@request_stack']
  67. tags:
  68. - { name: route_enhancer }
  69. # Handles the dynamic creation of routes (see graphql.routing.yml).
  70. graphql.route_provider:
  71. class: Drupal\graphql\RouteProvider
  72. arguments: ['@entity_type.manager', '@authentication_collector']
  73. # Handles the dynamic creation of routes (see graphql.permissions.yml).
  74. graphql.permission_provider:
  75. class: Drupal\graphql\PermissionProvider
  76. arguments: ['@entity_type.manager']
  77. # Schema introspection service.
  78. graphql.introspection:
  79. class: Drupal\graphql\GraphQL\Utility\Introspection
  80. # Validator service.
  81. graphql.validator:
  82. class: Drupal\graphql\GraphQL\Validator
  83. arguments: ['@plugin.manager.graphql.schema', '@logger.channel.graphql']
  84. # Reset the current language during sub-requests.
  85. graphql.subrequest_subscriber:
  86. class: Drupal\graphql\EventSubscriber\SubrequestSubscriber
  87. arguments: ['@language_manager', '@string_translation', '@current_user', '@?language_negotiator']
  88. tags:
  89. - { name: event_subscriber }
  90. # Reset the current language during operations.
  91. graphql.operation_subscriber:
  92. class: Drupal\graphql\EventSubscriber\OperationSubscriber
  93. arguments: ['@module_handler', '@language_manager', '@string_translation', '@current_user', '@?language_negotiator']
  94. tags:
  95. - { name: event_subscriber }
  96. # Plugin manager for schemas
  97. plugin.manager.graphql.schema:
  98. class: Drupal\graphql\Plugin\SchemaPluginManager
  99. arguments:
  100. - 'Plugin/GraphQL/Schema'
  101. - '@container.namespaces'
  102. - '@module_handler'
  103. - '@cache.graphql.definitions'
  104. - '\Drupal\graphql\Plugin\SchemaPluginInterface'
  105. - '\Drupal\graphql\Annotation\Schema'
  106. - '%graphql.config%'
  107. # Plugin manager for schemas
  108. plugin.manager.graphql.schema_extension:
  109. class: Drupal\graphql\Plugin\SchemaExtensionPluginManager
  110. arguments:
  111. - 'Plugin/GraphQL/SchemaExtension'
  112. - '@container.namespaces'
  113. - '@module_handler'
  114. - '@cache.graphql.definitions'
  115. - '\Drupal\graphql\Plugin\SchemaExtensionPluginInterface'
  116. - '\Drupal\graphql\Annotation\SchemaExtension'
  117. - '%graphql.config%'
  118. plugin.manager.graphql.data_producer:
  119. class: Drupal\graphql\Plugin\DataProducerPluginManager
  120. arguments:
  121. - 'Plugin/GraphQL/DataProducer'
  122. - '@container.namespaces'
  123. - '@module_handler'
  124. - '@cache.graphql.definitions'
  125. - '@request_stack'
  126. - '@cache_contexts_manager'
  127. - '@cache.graphql.results'
  128. - '\Drupal\graphql\Plugin\DataProducerPluginInterface'
  129. - '\Drupal\graphql\Annotation\DataProducer'
  130. - '%graphql.config%'
  131. # File upload.
  132. graphql.file_upload:
  133. class: Drupal\graphql\GraphQL\Utility\FileUpload
  134. arguments:
  135. - '@entity_type.manager'
  136. - '@current_user'
  137. - '@file.mime_type.guesser'
  138. - '@file_system'
  139. - '@logger.channel.graphql'
  140. - '@token'
  141. - '@lock'
  142. - '@config.factory'
  143. - '@renderer'
  144. plugin.manager.graphql.persisted_query:
  145. class: Drupal\graphql\Plugin\PersistedQueryPluginManager
  146. arguments:
  147. - 'Plugin/GraphQL/PersistedQuery'
  148. - '@container.namespaces'
  149. - '@module_handler'
  150. - '@cache.graphql.definitions'
  151. - '\Drupal\graphql\Plugin\PersistedQueryPluginInterface'
  152. - '\Drupal\graphql\Annotation\PersistedQuery'
  153. - '%graphql.config%'
  154. # Buffers.
  155. graphql.buffer.entity:
  156. class: Drupal\graphql\GraphQL\Buffers\EntityBuffer
  157. arguments: ['@entity_type.manager']
  158. graphql.buffer.entity_revision:
  159. class: Drupal\graphql\GraphQL\Buffers\EntityRevisionBuffer
  160. arguments: ['@entity_type.manager']
  161. graphql.buffer.entity_uuid:
  162. class: Drupal\graphql\GraphQL\Buffers\EntityUuidBuffer
  163. arguments: ['@entity_type.manager']
  164. graphql.buffer.subrequest:
  165. class: Drupal\graphql\GraphQL\Buffers\SubRequestBuffer
  166. arguments: ['@http_kernel', '@request_stack']
  167. # Ensure our language negotiation method is always first.
  168. graphql.config_factory_override:
  169. class: Drupal\graphql\Config\LanguageConfigOverride
  170. arguments: ['@config.storage', '@?plugin.manager.language_negotiation_method']
  171. tags:
  172. - { name: config.factory.override, priority: -253 }

Services

Namesort descending Description
access_check.graphql.explorer Drupal\graphql\Access\ExplorerAccessCheck
access_check.graphql.query Drupal\graphql\Access\QueryAccessCheck
access_check.graphql.voyager Drupal\graphql\Access\VoyagerAccessCheck
cache.graphql.ast Drupal\Core\Cache\CacheBackendInterface
cache.graphql.definitions Drupal\Core\Cache\CacheBackendInterface
cache.graphql.results Drupal\Core\Cache\CacheBackendInterface
cache_context.static Drupal\graphql\Cache\Context\StaticCacheContext
graphql.buffer.entity Drupal\graphql\GraphQL\Buffers\EntityBuffer
graphql.buffer.entity_revision Drupal\graphql\GraphQL\Buffers\EntityRevisionBuffer
graphql.buffer.entity_uuid Drupal\graphql\GraphQL\Buffers\EntityUuidBuffer
graphql.buffer.subrequest Drupal\graphql\GraphQL\Buffers\SubRequestBuffer
graphql.config_factory_override Drupal\graphql\Config\LanguageConfigOverride
graphql.executor Drupal\graphql\GraphQL\Execution\ExecutorFactory
graphql.file_upload Drupal\graphql\GraphQL\Utility\FileUpload
graphql.introspection Drupal\graphql\GraphQL\Utility\Introspection
graphql.operation_subscriber Drupal\graphql\EventSubscriber\OperationSubscriber
graphql.permission_provider Drupal\graphql\PermissionProvider
graphql.route_enhancer.query Drupal\graphql\Routing\QueryRouteEnhancer
graphql.route_provider Drupal\graphql\RouteProvider
graphql.subrequest_subscriber Drupal\graphql\EventSubscriber\SubrequestSubscriber
graphql.validator Drupal\graphql\GraphQL\Validator
logger.channel.graphql
plugin.manager.graphql.data_producer Drupal\graphql\Plugin\DataProducerPluginManager
plugin.manager.graphql.persisted_query Drupal\graphql\Plugin\PersistedQueryPluginManager
plugin.manager.graphql.schema Drupal\graphql\Plugin\SchemaPluginManager
plugin.manager.graphql.schema_extension Drupal\graphql\Plugin\SchemaExtensionPluginManager