mirror of
https://github.com/a2nt/cms-niceties.git
synced 2024-10-22 11:05:46 +02:00
FIX: GraphQL loading
This commit is contained in:
parent
e08677ef74
commit
ed4e65e7f3
@ -1,41 +0,0 @@
|
|||||||
---
|
|
||||||
Name: a2nt-cms-niceties-base-graphql
|
|
||||||
After: graphqlconfig
|
|
||||||
Only:
|
|
||||||
moduleexists:
|
|
||||||
- 'silverstripe/graphql'
|
|
||||||
---
|
|
||||||
SilverStripe\Control\Director:
|
|
||||||
rules:
|
|
||||||
'graphql': '%$SilverStripe\GraphQL\Controller.default'
|
|
||||||
|
|
||||||
SilverStripe\GraphQL\Controller:
|
|
||||||
cors:
|
|
||||||
Enabled: true
|
|
||||||
Allow-Origin: '*'
|
|
||||||
Allow-Headers: 'Authorization, Content-Type, Content-Language, apikey'
|
|
||||||
Allow-Methods: 'GET, PUT, DELETE, OPTIONS, POST'
|
|
||||||
#Allow-Credentials: 'true'
|
|
||||||
Max-Age: 600 # 600 seconds = 10 minutes.
|
|
||||||
|
|
||||||
SilverStripe\GraphQL\Auth\Handler:
|
|
||||||
authenticators:
|
|
||||||
- class: A2nt\CMSNiceties\GraphQL\APIKeyAuthenticator
|
|
||||||
priority: 30
|
|
||||||
|
|
||||||
SilverStripe\GraphQL\Manager.default:
|
|
||||||
properties:
|
|
||||||
Middlewares:
|
|
||||||
APIKeyMiddleware: A2nt\CMSNiceties\GraphQL\APIKeyMiddleware
|
|
||||||
|
|
||||||
SilverStripe\GraphQL\Manager:
|
|
||||||
schemas:
|
|
||||||
default:
|
|
||||||
types:
|
|
||||||
member: 'A2nt\CMSNiceties\GraphQL\MemberTypeCreator'
|
|
||||||
page: 'A2nt\CMSNiceties\GraphQL\PageTypeCreator'
|
|
||||||
element: 'A2nt\CMSNiceties\GraphQL\ElementTypeCreator'
|
|
||||||
queries:
|
|
||||||
readPages: 'A2nt\CMSNiceties\GraphQL\PaginatedReadPagesQueryCreator'
|
|
||||||
readMembers: 'A2nt\CMSNiceties\GraphQL\ReadMembersQueryCreator'
|
|
||||||
paginatedReadMembers: 'A2nt\CMSNiceties\GraphQL\PaginatedReadMembersQueryCreator'
|
|
@ -1,60 +0,0 @@
|
|||||||
---
|
|
||||||
Name: a2nt-cms-niceties-base-logs-dev
|
|
||||||
Only:
|
|
||||||
environment: dev
|
|
||||||
---
|
|
||||||
SilverStripe\Core\Injector\Injector:
|
|
||||||
Psr\Log\LoggerInterface.errorhandler:
|
|
||||||
calls:
|
|
||||||
pushMyDisplayErrorHandler: [pushHandler, ['%$DisplayErrorHandler']]
|
|
||||||
DisplayErrorHandler:
|
|
||||||
class: SilverStripe\Logging\HTTPOutputHandler
|
|
||||||
constructor:
|
|
||||||
- 'notice'
|
|
||||||
properties:
|
|
||||||
Formatter: '%$SilverStripe\Logging\DetailedErrorFormatter'
|
|
||||||
CLIFormatter: '%$SilverStripe\Logging\DetailedErrorFormatter'
|
|
||||||
---
|
|
||||||
Name: a2nt-cms-niceties-base-logs-live
|
|
||||||
Except:
|
|
||||||
environment: dev
|
|
||||||
---
|
|
||||||
SilverStripe\Core\Injector\Injector:
|
|
||||||
# Default logger implementation for general purpose use
|
|
||||||
Psr\Log\LoggerInterface:
|
|
||||||
calls:
|
|
||||||
# Save system logs to file
|
|
||||||
pushFileLogHandler: [pushHandler, ['%$LogFileHandler']]
|
|
||||||
|
|
||||||
# Core error handler for system use
|
|
||||||
Psr\Log\LoggerInterface.errorhandler:
|
|
||||||
calls:
|
|
||||||
# Save errors to file
|
|
||||||
pushFileLogHandler: [pushHandler, ['%$LogFileHandler']]
|
|
||||||
# Format and display errors in the browser/CLI
|
|
||||||
pushMyDisplayErrorHandler: [pushHandler, ['%$DisplayErrorHandler']]
|
|
||||||
|
|
||||||
# Custom handler to log to a file
|
|
||||||
LogFileHandler:
|
|
||||||
class: Monolog\Handler\StreamHandler
|
|
||||||
constructor:
|
|
||||||
- '../silverstripe.log'
|
|
||||||
- 'notice'
|
|
||||||
properties:
|
|
||||||
Formatter: '%$Monolog\Formatter\HtmlFormatter'
|
|
||||||
ContentType: text/html
|
|
||||||
|
|
||||||
# Handler for displaying errors in the browser or CLI
|
|
||||||
DisplayErrorHandler:
|
|
||||||
class: SilverStripe\Logging\HTTPOutputHandler
|
|
||||||
constructor:
|
|
||||||
- 'error'
|
|
||||||
properties:
|
|
||||||
Formatter: '%$SilverStripe\Logging\DebugViewFriendlyErrorFormatter'
|
|
||||||
|
|
||||||
# Configuration for the "friendly" error formatter
|
|
||||||
SilverStripe\Logging\DebugViewFriendlyErrorFormatter:
|
|
||||||
class: SilverStripe\Logging\DebugViewFriendlyErrorFormatter
|
|
||||||
properties:
|
|
||||||
Title: 'There has been an error'
|
|
||||||
Body: 'The website server has not been able to respond to your request'
|
|
@ -26,7 +26,7 @@ SilverStripe\GraphQL\Schema\Schema:
|
|||||||
max_query_complexity: 200 # default unlimited
|
max_query_complexity: 200 # default unlimited
|
||||||
default:
|
default:
|
||||||
src:
|
src:
|
||||||
- app/_graphql
|
- vendor/a2nt/cms-niceties/_graphql
|
||||||
|
|
||||||
SilverStripe\GraphQLDevTools\Controller:
|
SilverStripe\GraphQLDevTools\Controller:
|
||||||
# show two schemas
|
# show two schemas
|
||||||
|
@ -1,42 +0,0 @@
|
|||||||
---
|
|
||||||
Name: a2nt-cms-niceties-locale-fluent
|
|
||||||
After:
|
|
||||||
- a2nt-cms-niceties-extensions
|
|
||||||
- a2nt-cms-niceties-elemental
|
|
||||||
- a2nt-cms-niceties-locale
|
|
||||||
---
|
|
||||||
# Define Fluent locales
|
|
||||||
TractorCow\Fluent\Model\Locale:
|
|
||||||
default_records:
|
|
||||||
en:
|
|
||||||
Title: 'EN'
|
|
||||||
Locale: en_US
|
|
||||||
URLSegment: en
|
|
||||||
IsGlobalDefault: 1
|
|
||||||
us:
|
|
||||||
Locale: en_US
|
|
||||||
Title: 'EN'
|
|
||||||
URLSegment: en
|
|
||||||
ru:
|
|
||||||
Locale: ru_RU
|
|
||||||
Title: 'RU'
|
|
||||||
URLSegment: ru
|
|
||||||
Fallbacks:
|
|
||||||
- =>TractorCow\Fluent\Model\Locale.us
|
|
||||||
|
|
||||||
# Enable Fluent extensions
|
|
||||||
Page:
|
|
||||||
extensions:
|
|
||||||
- DNADesign\Elemental\TopPage\SiteTreeExtension
|
|
||||||
- DNADesign\Elemental\Extensions\ElementalPageExtension
|
|
||||||
- A2nt\CMSNiceties\Extensions\PageFluentExtension
|
|
||||||
|
|
||||||
DNADesign\Elemental\Models\ElementalArea:
|
|
||||||
extensions:
|
|
||||||
- DNADesign\Elemental\TopPage\FluentExtension
|
|
||||||
- A2nt\CMSNiceties\Extensions\ElementalArea
|
|
||||||
|
|
||||||
DNADesign\Elemental\Models\BaseElement:
|
|
||||||
extensions:
|
|
||||||
- DNADesign\Elemental\TopPage\FluentExtension
|
|
||||||
- A2nt\CMSNiceties\Extensions\ElementRows
|
|
@ -1,23 +0,0 @@
|
|||||||
---
|
|
||||||
Name: a2nt-cms-niceties-shop
|
|
||||||
---
|
|
||||||
SilverStripe\Core\Injector\Injector:
|
|
||||||
SilverShop\Checkout\SinglePageCheckoutComponentConfig:
|
|
||||||
class: A2nt\CMSNiceties\Models\CheckoutNoDeliveryConfig
|
|
||||||
|
|
||||||
SilverShop\Extension\ShopConfigExtension:
|
|
||||||
base_currency: USD
|
|
||||||
|
|
||||||
SilverShop\Model\Address:
|
|
||||||
extensions:
|
|
||||||
- A2nt\CMSNiceties\Extensions\AddressExtension
|
|
||||||
|
|
||||||
SilverShop\Cart\ShoppingCartController:
|
|
||||||
extensions:
|
|
||||||
- A2nt\CMSNiceties\Extensions\ShoppingCartControllerExtension
|
|
||||||
|
|
||||||
A2nt\CMSNiceties\Templates\DeferedRequirements:
|
|
||||||
custom_requirements:
|
|
||||||
SilverShop\Page\AccountPageController:
|
|
||||||
- SilverShop.Page.CheckoutPageController.js
|
|
||||||
- SilverShop.Page.CheckoutPageController.css
|
|
@ -17,7 +17,7 @@ class ObjectGraphQlEx extends DataExtension
|
|||||||
// Get rendered template
|
// Get rendered template
|
||||||
public function MainContent()
|
public function MainContent()
|
||||||
{
|
{
|
||||||
$object = $this;
|
$object = $this->owner;
|
||||||
return isset($object->GraphQLContent) ? $object->GraphQLContent : null;
|
return isset($object->GraphQLContent) ? $object->GraphQLContent : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user