Source of file GraphQLSchemaExtractor.php
Size: 0,567 Bytes - Last Modified: 2021-12-23T10:19:08+00:00
/var/www/docs.ssmods.com/process/src/tests/GraphQLSchemaExtractor.php
1234567891011121314151617181920212223242526 | <?php namespace AdvancedLearning\Oauth2Server\Tests; use GraphQL\Type\Schema; use SilverStripe\GraphQL\Middleware\QueryMiddleware; class GraphQLSchemaExtractor implements QueryMiddleware { protected $callback; public function __construct($callback) { $this->callback = $callback; } public function process(Schema $schema, $query, $context, $params, callable $next) { if ($this->callback) { call_user_func($this->callback, $context); } return $next($schema, $query, $context, $params); } } |