Aucune image disponible

GraphApi Module

Advanced API for Prestashop development

Developed by CubaDevOps

Get This Module Free on GitHub
License: Apache-2.0 Status: Unknown Health: Very Outdated

Info updated 1 month ago

Sources
Stars: 6 Forks: 1 Last commit: Oct 13, 2023
Type
Module

Info checked: Mar 2, 2026

GraphAPI Module for PrestaShop

Overview

The GraphAPI module for PrestaShop is a powerful tool that enables dynamic GraphQL-based access to your PrestaShop store's resources. This module allows clients to query and retrieve only the data they need, optimizing performance and providing a flexible API for your e-commerce platform.

Features

  • GraphQL Integration: Implement GraphQL to provide efficient and flexible access to PrestaShop resources.
  • Dynamic Queries: Clients can craft queries to request specific data, reducing overhead.
  • Exception Handling: Robust error handling to ensure smooth operation even in case of query errors.
  • Performance Metrics: Monitor and optimize performance with built-in timing measurements.

Getting Started

Prerequisites

Before using this module, ensure you have the following prerequisites installed:

Installation

1. Clone this repository to your PrestaShop modules directory:

   git clone https://github.com/cbatista8a/graphapi.git modules/graphapi

cd modules/graphapi composer install

2. After <code>composer install</code> you need to do some tricks for avoid errors caused for namespace collisions between this module and Prestashop dependencies.

   composer prefix-namespace

composer clean composer build composer install --no-dev

3. Navigate to your PrestaShop admin panel and go to Modules and Services. 4. Find the "GraphAPI" module and click "Install."

Usage

1. Configure your ChromeiQL client and set your endpoint e.g., http://yourstore.com/graph-api 2. Make requests to the module's endpoint, , with your GraphQL query as the request body. 3. Example GraphQL query:

{

categories { id localizedFields(id_lang:1) { name } parent { id localizedFields(id_lang:1) { name } } } }

Performance Monitoring

You can monitor the performance of your GraphAPI requests by inspecting the response's <code>performance</code> object (when Debug mode or profiling are enabled), which includes timing information.

License

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

Contributing

Thank you for considering contributing to this project! To get started, follow these steps:

1. Fork the repository on GitHub. 2. Create a branch for your feature or bug fix. 3. Make your changes and commit them with clear commit messages. 4. Push your changes to your fork. 5. Create a pull request to the <code>master</code> branch of this repository.

Contact

If you have any questions or need further assistance, feel free to reach out to the project maintainer:

Author: Carlos Batista | CubaDevOps Founder

Email: carlos.batista@cubadevops.com

Acknowledgments

PrestaShop - The e-commerce platform used as the foundation for this module.

Hacktoberfest - for celebrating open source contributions every October and inspiring me to open this private repository to the community.

We appreciate your interest in contributing to open source and hope you find this module useful!

  • Référence
    graphapi

  • License
    Apache-2.0
  • Status
    Unknown

Commentaires (0)

Aucun avis n'a été publié pour le moment.
Chargement...