You are here

graphql.services.yml in GraphQL 8.3

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. # Logger channel for graphql related logging.
  21. logger.channel.graphql:
  22. parent: logger.channel_base
  23. arguments: ['graphql']
  24. # Cache bin for graphql plugin definitions.
  25. cache.graphql.definitions:
  26. class: Drupal\Core\Cache\CacheBackendInterface
  27. tags:
  28. - { name: cache.bin }
  29. factory: cache_factory:get
  30. arguments: [graphql_definitions]
  31. # Cache bin for graphql query results.
  32. cache.graphql.results:
  33. class: Drupal\Core\Cache\CacheBackendInterface
  34. tags:
  35. - { name: cache.bin }
  36. factory: cache_factory:get
  37. arguments: [graphql_results]
  38. # Schema and processor factory.
  39. graphql.query_processor:
  40. class: Drupal\graphql\GraphQL\Execution\QueryProcessor
  41. arguments:
  42. - '@cache_contexts_manager'
  43. - '@plugin.manager.graphql.schema'
  44. - '@cache.graphql.results'
  45. - '@request_stack'
  46. # Query map provider using the composite pattern.
  47. graphql.query_provider:
  48. class: Drupal\graphql\GraphQL\QueryProvider\QueryProvider
  49. tags:
  50. - { name: service_collector, tag: graphql_query_provider, call: addQueryProvider }
  51. graphql.query_provider.query_map.entity:
  52. class: Drupal\graphql\GraphQL\QueryProvider\EntityQueryMapQueryProvider
  53. arguments: ['@entity_type.manager']
  54. tags:
  55. - { name: graphql_query_provider }
  56. graphql.query_provider.query_map.json:
  57. class: Drupal\graphql\GraphQL\QueryProvider\JsonQueryMapQueryProvider
  58. arguments: ['@cache.default', '@config.factory']
  59. tags:
  60. - { name: graphql_query_provider }
  61. graphql.query_routes:
  62. class: Drupal\graphql\Routing\QueryRoutes
  63. arguments: ['@plugin.manager.graphql.schema', '@authentication_collector']
  64. tags:
  65. - { name: 'event_subscriber' }
  66. # Deny caching in the dynamic page cache.
  67. graphql.request_policy.deny_query:
  68. class: Drupal\graphql\Cache\RequestPolicy\DenyQuery
  69. tags:
  70. - { name: dynamic_page_cache_request_policy }
  71. # Upcasting for graphql query request parameters.
  72. graphql.route_enhancer.query:
  73. class: Drupal\graphql\Routing\QueryRouteEnhancer
  74. arguments: ['@graphql.query_provider']
  75. tags:
  76. - { name: route_enhancer }
  77. # Schema introspection service.
  78. graphql.introspection:
  79. class: Drupal\graphql\GraphQL\Utility\Introspection
  80. arguments: ['@graphql.query_processor']
  81. # Support for subrequests.
  82. graphql.subrequest_subscriber:
  83. class: Drupal\graphql\EventSubscriber\SubrequestSubscriber
  84. tags:
  85. - { name: event_subscriber }
  86. # Context repository for fetching contexts from sub-requests.
  87. graphql.context_repository:
  88. class: Drupal\graphql\GraphQL\Context\ContextRepository
  89. tags:
  90. - { name: service_collector, tag: context_provider, call: addContextProvider }
  91. # Combines all type plugin managers.
  92. graphql.type_manager_aggregator:
  93. class: Drupal\graphql\Plugin\TypePluginManagerAggregator
  94. tags:
  95. - { name: service_collector, tag: graphql_type_manager, call: addTypeManager }
  96. # Plugin manager for schemas
  97. plugin.manager.graphql.schema:
  98. class: Drupal\graphql\Plugin\SchemaPluginManager
  99. arguments:
  100. - 'Plugin/GraphQL/Schemas'
  101. - '@container.namespaces'
  102. - '@module_handler'
  103. - '@cache.graphql.definitions'
  104. - '\Drupal\graphql\Plugin\SchemaPluginInterface'
  105. - '\Drupal\graphql\Annotation\GraphQLSchema'
  106. - '%graphql.config%'
  107. # Plugin manager for fields.
  108. plugin.manager.graphql.field:
  109. class: Drupal\graphql\Plugin\FieldPluginManager
  110. arguments:
  111. - 'Plugin/GraphQL/Fields'
  112. - '@container.namespaces'
  113. - '@module_handler'
  114. - '@cache.graphql.definitions'
  115. - '\Drupal\graphql\Plugin\FieldPluginInterface'
  116. - '\Drupal\graphql\Annotation\GraphQLField'
  117. - '%graphql.config%'
  118. # Plugin manager for mutations.
  119. plugin.manager.graphql.mutation:
  120. class: Drupal\graphql\Plugin\MutationPluginManager
  121. arguments:
  122. - 'Plugin/GraphQL/Mutations'
  123. - '@container.namespaces'
  124. - '@module_handler'
  125. - '@cache.graphql.definitions'
  126. - '\Drupal\graphql\Plugin\MutationPluginInterface'
  127. - '\Drupal\graphql\Annotation\GraphQLMutation'
  128. - '%graphql.config%'
  129. plugin.manager.graphql.subscription:
  130. class: Drupal\graphql\Plugin\SubscriptionPluginManager
  131. arguments:
  132. - 'Plugin/GraphQL/Subscriptions'
  133. - '@container.namespaces'
  134. - '@module_handler'
  135. - '@cache.graphql.definitions'
  136. - '\Drupal\graphql\Plugin\SubscriptionPluginInterface'
  137. - '\Drupal\graphql\Annotation\GraphQLSubscription'
  138. - '%graphql.config%'
  139. # Plugin manager implementations for schema types.
  140. plugin.manager.graphql.union:
  141. class: Drupal\graphql\Plugin\TypePluginManager
  142. tags:
  143. - { name: graphql_type_manager }
  144. arguments:
  145. - 'Plugin/GraphQL/UnionTypes'
  146. - '@container.namespaces'
  147. - '@module_handler'
  148. - '@cache.graphql.definitions'
  149. - '\Drupal\graphql\Plugin\GraphQL\Unions\UnionTypePluginBase'
  150. - '\Drupal\graphql\Annotation\GraphQLUnionType'
  151. - 'union_types'
  152. - '%graphql.config%'
  153. plugin.manager.graphql.interface:
  154. class: Drupal\graphql\Plugin\TypePluginManager
  155. tags:
  156. - { name: graphql_type_manager }
  157. arguments:
  158. - 'Plugin/GraphQL/Interfaces'
  159. - '@container.namespaces'
  160. - '@module_handler'
  161. - '@cache.graphql.definitions'
  162. - '\Drupal\graphql\Plugin\GraphQL\Interfaces\InterfacePluginBase'
  163. - '\Drupal\graphql\Annotation\GraphQLInterface'
  164. - 'interfaces'
  165. - '%graphql.config%'
  166. plugin.manager.graphql.type:
  167. class: Drupal\graphql\Plugin\TypePluginManager
  168. tags:
  169. - { name: graphql_type_manager }
  170. arguments:
  171. - 'Plugin/GraphQL/Types'
  172. - '@container.namespaces'
  173. - '@module_handler'
  174. - '@cache.graphql.definitions'
  175. - '\Drupal\graphql\Plugin\GraphQL\Types\TypePluginBase'
  176. - '\Drupal\graphql\Annotation\GraphQLType'
  177. - 'types'
  178. - '%graphql.config%'
  179. plugin.manager.graphql.input:
  180. class: Drupal\graphql\Plugin\TypePluginManager
  181. tags:
  182. - { name: graphql_type_manager }
  183. arguments:
  184. - 'Plugin/GraphQL/InputTypes'
  185. - '@container.namespaces'
  186. - '@module_handler'
  187. - '@cache.graphql.definitions'
  188. - '\Drupal\graphql\Plugin\GraphQL\InputTypes\InputTypePluginBase'
  189. - '\Drupal\graphql\Annotation\GraphQLInputType'
  190. - 'input_types'
  191. - '%graphql.config%'
  192. plugin.manager.graphql.scalar:
  193. class: Drupal\graphql\Plugin\TypePluginManager
  194. tags:
  195. - { name: graphql_type_manager }
  196. arguments:
  197. - 'Plugin/GraphQL/Scalars'
  198. - '@container.namespaces'
  199. - '@module_handler'
  200. - '@cache.graphql.definitions'
  201. - '\Drupal\graphql\Plugin\GraphQL\Scalars\ScalarPluginBase'
  202. - '\Drupal\graphql\Annotation\GraphQLScalar'
  203. - 'scalars'
  204. - '%graphql.config%'
  205. plugin.manager.graphql.enum:
  206. class: Drupal\graphql\Plugin\TypePluginManager
  207. tags:
  208. - { name: graphql_type_manager }
  209. arguments:
  210. - 'Plugin/GraphQL/Enums'
  211. - '@container.namespaces'
  212. - '@module_handler'
  213. - '@cache.graphql.definitions'
  214. - '\Drupal\graphql\Plugin\GraphQL\Enums\EnumPluginBase'
  215. - '\Drupal\graphql\Annotation\GraphQLEnum'
  216. - 'enums'
  217. - '%graphql.config%'
  218. # Voyager.
  219. graphql.voyager.page_display_variant_subscriber:
  220. class: Drupal\graphql\EventSubscriber\VoyagerPageDisplayVariantSubscriber
  221. tags:
  222. - { name: event_subscriber }
  223. graphql.voyager.routes:
  224. class: Drupal\graphql\Routing\VoyagerRoutes
  225. arguments: ['@plugin.manager.graphql.schema']
  226. tags:
  227. - { name: 'event_subscriber' }
  228. # Explorer.
  229. graphql.graphiql.page_display_variant_subscriber:
  230. class: Drupal\graphql\EventSubscriber\ExplorerPageDisplayVariantSubscriber
  231. tags:
  232. - { name: event_subscriber }
  233. graphql.graphiql.explorer_routes:
  234. class: Drupal\graphql\Routing\ExplorerRoutes
  235. arguments: ['@plugin.manager.graphql.schema']
  236. tags:
  237. - { name: 'event_subscriber' }
  238. # Buffers.
  239. graphql.buffer.entity:
  240. class: Drupal\graphql\GraphQL\Buffers\EntityBuffer
  241. arguments: ['@entity_type.manager']
  242. graphql.buffer.subrequest:
  243. class: Drupal\graphql\GraphQL\Buffers\SubRequestBuffer
  244. arguments: ['@http_kernel', '@request_stack']
  245. graphql.language_context:
  246. class: Drupal\graphql\GraphQLLanguageContext
  247. arguments: ['@language_manager', '@string_translation']
  248. graphql.config_factory_override:
  249. class: Drupal\graphql\Config\GraphQLConfigOverrides
  250. arguments: ['@config.storage', '@?plugin.manager.language_negotiation_method']
  251. tags:
  252. - { name: config.factory.override, priority: -253 }

Services

Namesort descending Description
access_check.graphql.query Drupal\graphql\Access\QueryAccessCheck
cache.graphql.definitions Drupal\Core\Cache\CacheBackendInterface
cache.graphql.results Drupal\Core\Cache\CacheBackendInterface
graphql.buffer.entity Drupal\graphql\GraphQL\Buffers\EntityBuffer
graphql.buffer.subrequest Drupal\graphql\GraphQL\Buffers\SubRequestBuffer
graphql.config_factory_override Drupal\graphql\Config\GraphQLConfigOverrides
graphql.context_repository Drupal\graphql\GraphQL\Context\ContextRepository
graphql.graphiql.explorer_routes Drupal\graphql\Routing\ExplorerRoutes
graphql.graphiql.page_display_variant_subscriber Drupal\graphql\EventSubscriber\ExplorerPageDisplayVariantSubscriber
graphql.introspection Drupal\graphql\GraphQL\Utility\Introspection
graphql.language_context Drupal\graphql\GraphQLLanguageContext
graphql.query_processor Drupal\graphql\GraphQL\Execution\QueryProcessor
graphql.query_provider Drupal\graphql\GraphQL\QueryProvider\QueryProvider
graphql.query_provider.query_map.entity Drupal\graphql\GraphQL\QueryProvider\EntityQueryMapQueryProvider
graphql.query_provider.query_map.json Drupal\graphql\GraphQL\QueryProvider\JsonQueryMapQueryProvider
graphql.query_routes Drupal\graphql\Routing\QueryRoutes
graphql.request_policy.deny_query Drupal\graphql\Cache\RequestPolicy\DenyQuery
graphql.route_enhancer.query Drupal\graphql\Routing\QueryRouteEnhancer
graphql.subrequest_subscriber Drupal\graphql\EventSubscriber\SubrequestSubscriber
graphql.type_manager_aggregator Drupal\graphql\Plugin\TypePluginManagerAggregator
graphql.voyager.page_display_variant_subscriber Drupal\graphql\EventSubscriber\VoyagerPageDisplayVariantSubscriber
graphql.voyager.routes Drupal\graphql\Routing\VoyagerRoutes
logger.channel.graphql
plugin.manager.graphql.enum Drupal\graphql\Plugin\TypePluginManager
plugin.manager.graphql.field Drupal\graphql\Plugin\FieldPluginManager
plugin.manager.graphql.input Drupal\graphql\Plugin\TypePluginManager
plugin.manager.graphql.interface Drupal\graphql\Plugin\TypePluginManager
plugin.manager.graphql.mutation Drupal\graphql\Plugin\MutationPluginManager
plugin.manager.graphql.scalar Drupal\graphql\Plugin\TypePluginManager
plugin.manager.graphql.schema Drupal\graphql\Plugin\SchemaPluginManager
plugin.manager.graphql.subscription Drupal\graphql\Plugin\SubscriptionPluginManager
plugin.manager.graphql.type Drupal\graphql\Plugin\TypePluginManager
plugin.manager.graphql.union Drupal\graphql\Plugin\TypePluginManager