Add new query from Aimeos GraphQL
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 2
- Joined: 02 Jul 2024, 18:32
Add new query from Aimeos GraphQL
I created a new entity using the manager and I want to receive records from the new table in the order template of the administrative panel, similar to customer :
but I can’t figure out how to implement and add new methods for querying in graphQL such as useCustomer and customer
when requesting with my entity I get an error :
message
:
"Cannot query field \"searchSellers\" on type \"query\". Did you mean \"searchOrders\", \"searchReviews\", \"searchRules\", \"searchSuppliers\", or \"searchCustomers\"?"
Code: Select all
<Multiselect class="item-customer form-control"
value-prop="customer.id"
track-by="customer.id"
label="customer.code"
@open="function(select) {return select.refreshOptions()}"
@input="useCustomer($event)"
:value="item"
:options="async function(query) {return await customer(query)}"
:disabled="!can('change')"
:resolve-on-load="false"
:filter-results="false"
:can-deselect="false"
:allow-absent="true"
:searchable="true"
:can-clear="false"
:required="true"
:min-chars="1"
:object="true"
:delay="300"
> </Multiselect>
but I can’t figure out how to implement and add new methods for querying in graphQL such as useCustomer and customer
when requesting with my entity I get an error :
message
:
"Cannot query field \"searchSellers\" on type \"query\". Did you mean \"searchOrders\", \"searchReviews\", \"searchRules\", \"searchSuppliers\", or \"searchCustomers\"?"
Re: Add new query from Aimeos GraphQL
To create GraphQL queries and and mutations for your new data domain automatically, add the domain name in ./config/admin.php of your own extension:
See: https://github.com/aimeos/ai-admin-grap ... /admin.php
Code: Select all
return [
'graphql' => [
'domains' => [
'mydomain' => 'mydomain'
]
]
];
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
-
- Posts: 2
- Joined: 02 Jul 2024, 18:32
Re: Add new query from Aimeos GraphQL
Thx its work