composer require inviqa/spryker-graphql
- Add
Inviqa
to$config[KernelConstants::CORE_NAMESPACES]
in config_default.php - Add
new GraphqlControllerProvider($isSsl)
toPyz\Yves\Application\YvesBootstrap::getControllerProviderStack()
- Add
new GraphqlConsole()
toPyz\Zed\Console\ConsoleDependencyProvider::getConsoleCommands()
- Generate GraphQL schema types using following command
vendor/bin/console graphql:types:generate
GraphQL endpoint: https://<yves host>/graphql
query {
navigation {
nodes {
navigationNode {
idNavigationNode
navigationNodeLocalizedAttributes {
title
}
}
children {
navigationNode {
idNavigationNode
navigationNodeLocalizedAttributes {
title
}
}
children {
navigationNode {
idNavigationNode
navigationNodeLocalizedAttributes {
title
}
}
}
}
}
}
}
query {
featuredProducts {
id_product_abstract
abstract_sku
abstract_name
}
}
query {
quote {
items {
sku
quantity
name
sumSubtotalAggregation
sumGrossPrice
sumNetPrice
abstractSku
}
currency {
code
}
customer {
firstName
lastName
}
}
}
mutation {
addToCart(sku: "<sku>", quantity: 1) {
items {
sku
quantity
}
}
}
- Move featured products data provider out of graphql module
- Move other data providers (quote, navigation) and mutations out of graphql module
- Add tests
- Create data resolver for all parent types manually and feed in QueryType
- (later, not decided) Use jwt token and store session ID int it, and use it to initiate session.