|
@@ -24,6 +24,7 @@ use Webkul\Core\Models\CountryState as BaseCountryState;
|
|
|
// Subresource nested collection: /countries/{country_id}/states
|
|
// Subresource nested collection: /countries/{country_id}/states
|
|
|
#[ApiResource(
|
|
#[ApiResource(
|
|
|
routePrefix: '/api/shop',
|
|
routePrefix: '/api/shop',
|
|
|
|
|
+ paginationEnabled: false,
|
|
|
uriTemplate: '/countries/{country_id}/states',
|
|
uriTemplate: '/countries/{country_id}/states',
|
|
|
uriVariables: [
|
|
uriVariables: [
|
|
|
'country_id' => new Link(
|
|
'country_id' => new Link(
|
|
@@ -58,6 +59,7 @@ use Webkul\Core\Models\CountryState as BaseCountryState;
|
|
|
#[ApiResource(
|
|
#[ApiResource(
|
|
|
routePrefix: '/api/shop',
|
|
routePrefix: '/api/shop',
|
|
|
shortName: 'CountryState',
|
|
shortName: 'CountryState',
|
|
|
|
|
+ paginationEnabled: false,
|
|
|
uriTemplate: '/country-states',
|
|
uriTemplate: '/country-states',
|
|
|
operations: [
|
|
operations: [
|
|
|
new GetCollection,
|
|
new GetCollection,
|
|
@@ -65,16 +67,12 @@ use Webkul\Core\Models\CountryState as BaseCountryState;
|
|
|
graphQlOperations: [
|
|
graphQlOperations: [
|
|
|
new QueryCollection(
|
|
new QueryCollection(
|
|
|
provider: CountryStateCollectionProvider::class,
|
|
provider: CountryStateCollectionProvider::class,
|
|
|
- paginationType: 'cursor',
|
|
|
|
|
|
|
+ paginationEnabled: false,
|
|
|
args: [
|
|
args: [
|
|
|
'countryId' => [
|
|
'countryId' => [
|
|
|
'type' => 'Int!',
|
|
'type' => 'Int!',
|
|
|
'description' => 'Filter states by country ID (required)',
|
|
'description' => 'Filter states by country ID (required)',
|
|
|
],
|
|
],
|
|
|
- 'first' => ['type' => 'Int', 'description' => 'Limit results (forward pagination)'],
|
|
|
|
|
- 'last' => ['type' => 'Int', 'description' => 'Limit results (backward pagination)'],
|
|
|
|
|
- 'after' => ['type' => 'String', 'description' => 'Cursor for forward pagination'],
|
|
|
|
|
- 'before' => ['type' => 'String', 'description' => 'Cursor for backward pagination'],
|
|
|
|
|
]
|
|
]
|
|
|
),
|
|
),
|
|
|
]
|
|
]
|