Skip to content

Commit 18ebc44

Browse files
committed
updated files
0 parents  commit 18ebc44

File tree

12 files changed

+358
-0
lines changed

12 files changed

+358
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
4+
namespace Lof\FaqGraphQl\Model\Resolver\DataProvider;
5+
6+
class FaqCategory
7+
{
8+
9+
private $categories;
10+
11+
/**
12+
* @param Lof\Faq\Api\CategoriesInterface $categories
13+
*/
14+
public function __construct(
15+
Lof\Faq\Api\CategoriesInterface $categories
16+
) {
17+
$this->categories = $categories;
18+
}
19+
20+
public function getFaqCategory()
21+
{
22+
return 'proviced data';
23+
}
24+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
4+
namespace Lof\FaqGraphQl\Model\Resolver\DataProvider;
5+
6+
class FaqQuestion
7+
{
8+
9+
private $questionManagement;
10+
11+
/**
12+
* @param Lof\Faq\Api\QuestionManagementInterface $questionManagement
13+
*/
14+
public function __construct(
15+
Lof\Faq\Api\QuestionManagementInterface $questionManagement
16+
) {
17+
$this->questionManagement = $questionManagement;
18+
}
19+
20+
public function getFaqQuestion()
21+
{
22+
return 'proviced data';
23+
}
24+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
4+
namespace Lof\FaqGraphQl\Model\Resolver\DataProvider;
5+
6+
class FaqTag
7+
{
8+
9+
private $tagsManagement;
10+
11+
/**
12+
* @param Lof\Faq\Api\TagsManagementInterface $tagsManagement
13+
*/
14+
public function __construct(
15+
Lof\Faq\Api\TagsManagementInterface $tagsManagement
16+
) {
17+
$this->tagsManagement = $tagsManagement;
18+
}
19+
20+
public function getFaqTag()
21+
{
22+
return 'proviced data';
23+
}
24+
}

Model/Resolver/FaqCategory.php

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
3+
4+
namespace Lof\FaqGraphQl\Model\Resolver;
5+
6+
use Magento\Framework\Exception\NoSuchEntityException;
7+
use Magento\Framework\GraphQl\Config\Element\Field;
8+
use Magento\Framework\GraphQl\Exception\GraphQlInputException;
9+
use Magento\Framework\GraphQl\Exception\GraphQlNoSuchEntityException;
10+
use Magento\Framework\GraphQl\Query\ResolverInterface;
11+
use Magento\Framework\GraphQl\Schema\Type\ResolveInfo;
12+
13+
class FaqCategory implements ResolverInterface
14+
{
15+
16+
private $faqCategoryDataProvider;
17+
18+
/**
19+
* @param DataProvider\FaqCategory $faqCategoryRepository
20+
*/
21+
public function __construct(
22+
DataProvider\FaqCategory $faqCategoryDataProvider
23+
) {
24+
$this->faqCategoryDataProvider = $faqCategoryDataProvider;
25+
}
26+
27+
/**
28+
* @inheritdoc
29+
*/
30+
public function resolve(
31+
Field $field,
32+
$context,
33+
ResolveInfo $info,
34+
array $value = null,
35+
array $args = null
36+
) {
37+
$faqCategoryData = $this->faqCategoryDataProvider->getFaqCategory();
38+
return $faqCategoryData;
39+
}
40+
}

Model/Resolver/FaqQuestion.php

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?php
2+
3+
4+
namespace Lof\FaqGraphQl\Model\Resolver;
5+
6+
use Magento\Framework\Exception\NoSuchEntityException;
7+
use Magento\Framework\GraphQl\Config\Element\Field;
8+
use Magento\Framework\GraphQl\Exception\GraphQlInputException;
9+
use Magento\Framework\GraphQl\Exception\GraphQlNoSuchEntityException;
10+
use Magento\Framework\GraphQl\Query\ResolverInterface;
11+
use Magento\Framework\GraphQl\Schema\Type\ResolveInfo;
12+
13+
class FaqQuestion implements ResolverInterface
14+
{
15+
16+
private $faqQuestionDataProvider;
17+
18+
/**
19+
* @param DataProvider\FaqQuestion $faqQuestionRepository
20+
*/
21+
public function __construct(
22+
DataProvider\FaqQuestion $faqQuestionDataProvider
23+
) {
24+
$this->faqQuestionDataProvider = $faqQuestionDataProvider;
25+
}
26+
27+
/**
28+
* @inheritdoc
29+
*/
30+
public function resolve(
31+
Field $field,
32+
$context,
33+
ResolveInfo $info,
34+
array $value = null,
35+
array $args = null
36+
) {
37+
$faqQuestionData = $this->faqQuestionDataProvider->getFaqQuestion();
38+
return $faqQuestionData;
39+
}
40+
}

Model/Resolver/FaqSubmitQuestion.php

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
3+
4+
namespace Lof\FaqGraphQl\Model\Resolver;
5+
6+
use Magento\Framework\Exception\NoSuchEntityException;
7+
use Magento\Framework\GraphQl\Config\Element\Field;
8+
use Magento\Framework\GraphQl\Exception\GraphQlInputException;
9+
use Magento\Framework\GraphQl\Exception\GraphQlNoSuchEntityException;
10+
use Magento\Framework\GraphQl\Query\ResolverInterface;
11+
use Magento\Framework\GraphQl\Schema\Type\ResolveInfo;
12+
13+
class FaqSubmitQuestion implements ResolverInterface
14+
{
15+
16+
public function __construct()
17+
{
18+
19+
}
20+
21+
/**
22+
* @inheritdoc
23+
*/
24+
public function resolve(
25+
Field $field,
26+
$context,
27+
ResolveInfo $info,
28+
array $value = null,
29+
array $args = null
30+
) {
31+
32+
}
33+
}

Model/Resolver/FaqTag.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
3+
4+
namespace Lof\FaqGraphQl\Model\Resolver;
5+
6+
use Magento\Framework\Exception\NoSuchEntityException;
7+
use Magento\Framework\GraphQl\Config\Element\Field;
8+
use Magento\Framework\GraphQl\Exception\GraphQlInputException;
9+
use Magento\Framework\GraphQl\Exception\GraphQlNoSuchEntityException;
10+
use Magento\Framework\GraphQl\Query\ResolverInterface;
11+
use Magento\Framework\GraphQl\Schema\Type\ResolveInfo;
12+
13+
class FaqTag implements ResolverInterface
14+
{
15+
16+
private $faqTagDataProvider;
17+
18+
/**
19+
* @param DataProvider\FaqTag $faqTagRepository
20+
*/
21+
public function __construct(DataProvider\FaqTag $faqTagDataProvider)
22+
{
23+
$this->faqTagDataProvider = $faqTagDataProvider;
24+
}
25+
26+
/**
27+
* @inheritdoc
28+
*/
29+
public function resolve(
30+
Field $field,
31+
$context,
32+
ResolveInfo $info,
33+
array $value = null,
34+
array $args = null
35+
) {
36+
$faqTagData = $this->faqTagDataProvider->getFaqTag();
37+
return $faqTagData;
38+
}
39+
}

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# magento2-faq-graph-ql
2+
###### What is this extension about?
3+
With Magento 2 FAQ Graphql Extension, you will not need to worry about creating useful and nice FAQ page for your ecommerce website. The extension will help you to set up nice informative & SEO-friendly magento 2 FAQ page. With faq page, your customers will find convenient, easily and quick to resolve common issues.
4+
5+
###### Install Extension
6+
```
7+
composer require landofcoder/module-faq-graph-ql
8+
php bin/magento setup:upgrade
9+
php bin/magento setup:static-content:deploy -f
10+
11+
```
12+
13+
###### The module support graphql for faq extension just compatible for magento 2.3.x
14+

composer.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"name": "lof/module-faq-graph-ql",
3+
"description": "Magento 2 Faq Graph Ql extension is free module support graph ql for magento 2.3.x the module require commerce Lof Faq extension",
4+
"type": "magento2-module",
5+
"keywords": [
6+
"landofcoder",
7+
"landofcoder faq",
8+
"landofcoder faq graph ql",
9+
"faq magento 2",
10+
"magento 2 product questions grapql",
11+
"helpdesk magento 2",
12+
"question and answers for magento 2"
13+
],
14+
"license": [
15+
"OSL-3.0",
16+
"AFL-3.0"
17+
],
18+
"authors": [
19+
{
20+
"name": "Landofcoder",
21+
"email": "[email protected]",
22+
"role": "Magento 2 Lof Faq Graph Ql"
23+
}
24+
],
25+
"require": {
26+
"landofcoder/module-all" : "1.*"
27+
},
28+
"autoload": {
29+
"psr-4": {
30+
"Lof\\FaqGraphQl\\": ""
31+
},
32+
"files": [
33+
"registration.php"
34+
]
35+
}
36+
}

etc/module.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" ?>
2+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
3+
<module name="Lof_FaqGraphQl" setup_version="1.0.0">
4+
<sequence>
5+
<module name="Magento_GraphQl"/>
6+
<module name="Lof_Faq"/>
7+
</sequence>
8+
</module>
9+
</config>

0 commit comments

Comments
 (0)