Skip to Content

Odoo GraphQL Subscription

by

307.48

16.0 0
Live Preview
Required Apps Discuss (mail)
Community Apps Dependencies easy_graphql
api_auth_apikey
api_framework_base
ekika_utils
ekika_widgets
Technical Name easy_graphql_subscription
License OPL-1
You bought this module and need support ? Click here!
Technical Name easy_graphql_subscription
License OPL-1

Introduction

The Odoo Easy GraphQL Subscription module brings modern, real-time data handling to Odoo by enabling GraphQL subscriptions. With this feature, external applications can receive live updates based on changes in Odoo—no need for polling. This integration is designed for developers who want to build responsive and interactive user interfaces (like dashboards or mobile apps) that reflect Odoo data instantly.

Key Features

  • Support for GraphQL subscription endpoints to stream real-time updates

  • Easy configuration of subscription triggers on model changes

  • Designed to integrate seamlessly with Odoo’s data model and permission system

  • Lightweight and developer-friendly interface for GraphQL implementation

Benefits

  • Build responsive front-end apps or dashboards that reflect Odoo data in real time

  • Improve performance by eliminating the need for frequent polling

  • Enhance user experience with instantaneous updates and live data flow

  • Provide clean integration points for modern JavaScript and mobile frameworks

Compatibility & Technical Details

Technical Name: easy_graphql_subscription

License: LGPL-3

Required Modules:

  • GraphQL base or API framework module

  • GraphQL controller support (GraphQL_HANDLER)

  • Core Odoo modules: Models, HTTP, Security

Installation Steps:

  1. Ensure GraphQL base/API framework module and required GraphQL-integration dependencies are installed.

  2. Place the easy_graphql_subscription module into your Odoo Add-Ons directory.

  3. Enable Developer Mode and update the app list.

  4. Install the module through the Apps interface.

  5. Configure subscription definitions for desired models and triggers.

  6. Client applications can then subscribe to data events and receive updates in real time.

Supported Versions 16.0 17.0
Community
Enterprise

https://www.ekika.co/support

Odoo GraphQL Subscription

GraphQL Subscription Information

Note:

All screenshot in this page is with main framework module. If you have not buy api_framework module and only buy this module you will get only graphql. You will not get {json:api} with this module.

Headers supported by GraphQL subscription websocket clients will work; others will not work.(We use various authentication methods during a handshake call that depends on multiple factors, i.e., headers for API key-based authentication.) Subscription introspection will work, but subscription connections will not be established as it may depends on headers, and some introspection tools are not sending headers with websocket subscription calls.

Checkout "api_framework" Bundle
EKIKA API Framework
GraphQL Subscription Information

Introduction

This module specifically introduces GraphQL subscription functionality as a key feature.

How It Works

Icon First, you have to create record of GraphQL Subscription, which includes subscription-name, model and for which operations(create, write, delete) you want to use this subscription.

API Resource Access Configure Image

Icon Then run subscription with above created subscription name like below example:

API Resource Access Configure Image

Icon After that any change made related to this subscription it will show like below example.

API Resource Access Configure Image

GraphQL Subscription API Calls:

Icon Below are examples using postman:

API Resource Access Configure Image API Resource Access Configure Image API Resource Access Configure Image

Setup Instructions

Only Applicable for GraphQL Subscription.
Odoo setup instruction when configured behind the nginx proxy.

map $http_upgrade $connection_upgrade {

    default upgrade;
    ''      close;

  }

  server {

    # Your existing server configuration...

    # Set HTTP version to 1.1
    proxy_http_version 1.1;

    # Set headers for WebSocket upgrade
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";

    # Your GraphQL subscription endpoint location.
    # This is required when you use a worker (gevent) based Odoo server.
    location /graphql-subscription-endpoint {
        # Proxy pass to the Odoo server running on localhost at port 8072.
        # 8072 is gevent_port should be defined in odoo configuration file.
        proxy_pass http://127.0.0.1:8072;

        # Set headers for WebSocket upgrade
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;

        # Set headers for forwarding request details
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP $remote_addr;

    }

    # Your other server configurations...
}

Explanation

  • proxy_http_version 1.1 : Sets the HTTP version to 1.1 for proxy connections.
  • proxy_set_header Upgrade $http_upgrade : Sets the Upgrade header to $http_upgrade, enabling WebSocket upgrade support.
  • proxy_set_header Connection "upgrade" : Sets the Connection header to “upgrade” to signal WebSocket connection upgrade.
  • location /graphql-subscription-endpoint { … } : Defines a location block for handling requests to the GraphQL subscription endpoint.
  • proxy_pass http://127.0.0.1:8072 : Forwards requests to the Odoo server running on http://127.0.0.1:8072.
  • proxy_set_header X-Forwarded-Host $host : Sets the X-Forwarded-Host header to the value of $host, indicating the original host requested by the client.
  • proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for : Appends the client's IP address to the X-Forwarded-For header to indicate the client's original IP.
  • proxy_set_header X-Forwarded-Proto $scheme : Sets the X-Forwarded-Proto header to the value of $scheme, indicating the protocol used by the client (HTTP or HTTPS).
  • proxy_set_header X-Real-IP $remote_addr : Sets the X-Real-IP header to the client's IP address, providing the real IP of the client to the backend server.

Need Help?

EKIKA Has Your Back - 24/7 Support.

We're just a message away, no matter the time zone.

90 Days Free Support

We understand that even with great documentation, you might have questions or need additional assistance. That's why we offer exceptional support for "Odoo REST API Framework" users!

https://ekika.co/api
Documentation & User Guide
(copy link to clipboard)
https://www.youtube.com/@ekika_co/videos
Video Guide
(copy link to clipboard)
https://ekika.co/support
Support
(copy link to clipboard)

Frequently Asked Questions (FAQs)

Find answers of common questions you might have about this addon. If you don't see your question addressed here, feel free to contact us!

Contact Us:

  • Whats App / Phone: +919510031431 -- URGENT
  • EMail: [email protected]
  • Skype: amshukla17
  • Website: https://ekika.co
  • Support Ticket: https://ekika.co/support -- Get Notifications of Progress.
  • 24 x 7 Available! Contact us NOW.

We love hearing your ideas for improvement! If you have a feature in mind that would make your Odoo experience even better, simply contact us. We're happy to discuss your needs and explore the best way to implement them.

We offer a wide range of Odoo services to help you at any stage, from initial setup ("implementation") to ongoing customization and support. This includes:

  • Adding new features and functionalities ("addons development")
  • Changing behaviour of whole system ("server and structure level changes")
  • Server maintenance and configuration changes ("nginx / filestores / size issues etc.")
  • Integration with other systems
  • RESTful APIs, WebHooks, Slave-Master DB, Real-time data communication ("socket connection") etc.
  • Improving app performance and user experience ("performance tuning" and "UI/UX design")
  • Secure and reliable managed hosting solutions
  • Annual maintenance contracts to keep your Odoo running smoothly and so much more...

Basically, we're your one-stop shop for all things Odoo! We offer premium services at competitive rates.

No, GraphQL Subscriptions with WebSocket connection are not included in the standard API framework bundle.

Here's why:

Specialized Implementation: GraphQL Subscriptions require a specific implementation tailored to real-time data updates. This makes them unsuitable for generic use within the broader API framework.

Do you offer GraphQL Subscriptions for Projects?

Yes, absolutely! While not included in the standard bundle, we offer custom development of GraphQL Subscriptions specifically designed for your project needs.

We have basic generic demo available if you would like to give it a try.

How can I learn more about Custom GraphQL Subscriptions?

Contact Us: Reach out to our team directly to discuss your project requirements and request a demo of our custom GraphQL Subscription solutions. We look forward to helping you unlock the power of real-time data with GraphQL Subscriptions!

Services EKIKA Provides

EKIKA is your destination for expert Odoo ERP implementation and customization. We pride ourselves on building reliable, trust-based partnerships that give you full transparency and control over your business processes.

With over 12 years of experience, we can assist you with eCommerce platforms, production planning, point-of-sale systems, managing inventory adjustments, and providing advanced field worker tracking solutions to optimize your workflows and boost operational efficiency.

Ekika Odoo Implementation

Implementation

Utilise Odoo ERP tailored for your business needs for smooth operations.

Ekika Odoo Customization

Customization

Personalized adjustments to Odoo modules for seamless management.

Ekika Odoo Support

Support

Ongoing assistance and maintenance to optimize your Odoo system's performance.

Are you struggling with disorganized operations, high operational costs, or lack of transparency in your processes? What sets us apart is our commitment to personalized solutions tailored to your unique business needs and our proactive support, ensuring seamless integration and ongoing success.

Would you like to explore Odoo ERP for your business? Schedule a free consultation with EKIKA today!

Odoo Proprietary License v1.0
This software and associated files (the "Software") may only be used (executed,
modified, executed after modifications) if you have purchased a valid license
from the authors, typically via Odoo Apps, or if you have received a written
agreement from the authors of the Software (see the COPYRIGHT file).

You may develop Odoo modules that use the Software as a library (typically
by depending on it, importing it and using its resources), but without copying
any source code or material from the Software. You may distribute those
modules under the license of your choice, provided that this license is
compatible with the terms of the Odoo Proprietary License (For example:
LGPL, MIT, or proprietary licenses similar to this one).

It is forbidden to publish, distribute, sublicense, or sell copies of the Software
or modified copies of the Software.

The above copyright notice and this permission notice must be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.