uawdijnntqw1x1x1
IP : 216.73.216.107
Hostname : toronto-dev2
Kernel : Linux toronto-dev2 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Disable Function : None :)
OS : Linux
PATH:
/
srv
/
users
/
craft4
/
apps
/
craft4-newsite-space
/
vendor
/
craftcms
/
commerce
/
src
/
gql
/
queries
/
.
/
Product.php
/
/
<?php /** * @link https://craftcms.com/ * @copyright Copyright (c) Pixel & Tonic, Inc. * @license https://craftcms.github.io/license/ */ namespace craft\commerce\gql\queries; use craft\commerce\gql\arguments\elements\Product as ProductArguments; use craft\commerce\gql\interfaces\elements\Product as ProductInterface; use craft\commerce\gql\resolvers\elements\Product as ProductResolver; use craft\commerce\helpers\Gql as GqlHelper; use craft\gql\base\Query; use GraphQL\Type\Definition\Type; /** * Class Product * * @author Pixel & Tonic, Inc. <support@pixelandtonic.com> * @since 3.0 */ class Product extends Query { /** * @inheritdoc */ public static function getQueries(bool $checkToken = true): array { if ($checkToken && !GqlHelper::canQueryProducts()) { return []; } return [ 'products' => [ 'type' => Type::listOf(ProductInterface::getType()), 'args' => ProductArguments::getArguments(), 'resolve' => ProductResolver::class . '::resolve', 'description' => 'This query is used to query for products.', ], 'productCount' => [ 'type' => Type::nonNull(Type::int()), 'args' => ProductArguments::getArguments(), 'resolve' => ProductResolver::class . '::resolveCount', 'description' => 'This query is used to return the number of products.', ], 'product' => [ 'type' => ProductInterface::getType(), 'args' => ProductArguments::getArguments(), 'resolve' => ProductResolver::class . '::resolveOne', 'description' => 'This query is used to query for a product.', ], ]; } }
/srv/users/craft4/apps/craft4-newsite-space/vendor/craftcms/commerce/src/gql/queries/./Product.php