Skip to content

Commit

Permalink
[shopsys] graphql-bundle classes are now dumped so they can use compo…
Browse files Browse the repository at this point in the history
…ser autoload (#2830)
  • Loading branch information
TomasLudvik authored Oct 2, 2023
2 parents 2028d6b + 0e64af9 commit b68cd77
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 22 deletions.
1 change: 1 addition & 0 deletions app/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"App\\": [
"src/"
],
"Overblog\\GraphQLBundle\\__DEFINITIONS__\\": "var/overblogCompiledClasses",
"Sniffer\\": [
"sniffer/"
]
Expand Down
1 change: 1 addition & 0 deletions app/config/directories.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ parameters:
- "%shopsys.product_files_dir%"
internal_directories:
- '%kernel.cache_dir%/localeFileUploads'
- '%kernel.project_dir%/var/overblogCompiledClasses'
Original file line number Diff line number Diff line change
@@ -1,25 +1,3 @@
overblog_graphql:
definitions:
schema:
query: Query
mutation: Mutation
mappings:
types:
- type: yaml
dir: "%kernel.project_dir%/config/graphql/types"
builders:
args:
- alias: "PaginatorArgumentsBuilder"
class: App\FrontendApi\Component\Arguments\PaginatorArgumentsBuilder
- alias: "BlogArticlePaginatorArgumentsBuilder"
class: App\FrontendApi\Model\BlogArticle\BlogArticlePaginatorArgumentsBuilder
security:
handle_cors: true
query_max_complexity: 1110
enable_introspection: '%kernel.debug%'
services:
promise_adapter: "webonyx_graphql.sync_promise_adapter"

overblog_dataloader:
defaults:
promise_adapter: "overblog_dataloader.webonyx_graphql_sync_promise_adapter"
Expand Down
25 changes: 25 additions & 0 deletions app/config/packages/overblog_graphql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
overblog_graphql:
definitions:
schema:
query: Query
mutation: Mutation
mappings:
types:
- type: yaml
dir: "%kernel.project_dir%/config/graphql/types"
builders:
args:
- alias: "PaginatorArgumentsBuilder"
class: App\FrontendApi\Component\Arguments\PaginatorArgumentsBuilder
- alias: "BlogArticlePaginatorArgumentsBuilder"
class: App\FrontendApi\Model\BlogArticle\BlogArticlePaginatorArgumentsBuilder
# these settings are suggested by docs: https://github.com/overblog/GraphQLBundle/blob/master/docs/index.md#composer-autoloader-configuration-optional
use_classloader_listener: false
auto_compile: true
cache_dir: '%kernel.project_dir%/var/overblogCompiledClasses'
security:
handle_cors: true
query_max_complexity: 1110
enable_introspection: '%kernel.debug%'
services:
promise_adapter: "webonyx_graphql.sync_promise_adapter"

0 comments on commit b68cd77

Please sign in to comment.