{"id":42952509,"url":"https://github.com/divad1196/odoo_graphql","last_synced_at":"2026-01-30T21:33:20.650Z","repository":{"id":106008885,"uuid":"417931681","full_name":"divad1196/odoo_graphql","owner":"divad1196","description":"Graphql Generic integration in Odoo","archived":false,"fork":false,"pushed_at":"2025-07-05T16:56:24.000Z","size":2612,"stargazers_count":33,"open_issues_count":4,"forks_count":10,"subscribers_count":3,"default_branch":"18.0","last_synced_at":"2025-07-05T18:37:35.868Z","etag":null,"topics":["graphql","odoo","web","website"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/divad1196.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-10-16T19:50:29.000Z","updated_at":"2025-06-19T07:59:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"94b8e073-a3ff-4b16-8045-553a6b9943a0","html_url":"https://github.com/divad1196/odoo_graphql","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/divad1196/odoo_graphql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divad1196%2Fodoo_graphql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divad1196%2Fodoo_graphql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divad1196%2Fodoo_graphql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divad1196%2Fodoo_graphql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/divad1196","download_url":"https://codeload.github.com/divad1196/odoo_graphql/tar.gz/refs/heads/18.0","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/divad1196%2Fodoo_graphql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28919651,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T20:25:28.696Z","status":"ssl_error","status_checked_at":"2026-01-30T20:25:13.426Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graphql","odoo","web","website"],"created_at":"2026-01-30T21:33:19.986Z","updated_at":"2026-01-30T21:33:20.642Z","avatar_url":"https://github.com/divad1196.png","language":"Python","readme":"# Status: Still maintained\nThis repository is still **MAINTAINED** even though no commits are being made to it.\nThis is because the repository is **STABLE** and is only getting modified if:\n- A bug is found\n- A feature **request** is **approved** (after being proposed in an issue or a github discussion)  \nNOTE: Changes are following Odoo' support policy, i.e. the last 3 versions will benefit from the bug fixes and features addition.\n\nI will also ensure that it gets migrated to all next Odoo versions.\n\n# Graphql\n\nGraphql provides a simplier and more efficient way to query data than you would currently do in Odoo (using for example xmlrpc or jsonrpc).\n\nThis module adds a generic way to do graphql queries and mutations on Odoo server.\nThis module takes into account any installed modules and use the Odoo permissions (Access rights and access rules).\n\n\n\n```javascript\nquery Tickets {\n    HelpdeskTicket(domain: $domain, limit: $limit) {\n        name\n        description\n        user: user_id @include(if: $user_info) {\n            name\n        }\n        stage_id {\n            name\n        }\n        partner_id @include(if: $partner_id)  {\n            image: image_1920 @include(if: $image)\n            user_id {\n            \tname\n            }\n        }\n    }\n}\n```\n\nTo use the query:\n\n```python\nrequests.get(\"https://myodoo.com/graphql\",\n    # headers={\"Content-type\": \"application/graphql\"},  # Not required currently but recommended\n    data={\n        \"query\": myquery,\n        \"variables\": {},  # Optional\n        # https://dgraph.io/docs/graphql/api/multiples/#multiple-operations\n        \"operationName\": None  # Optional, used for multi-operation document\n\t},\n)\n```\n\n\n\nYou can also perform **mutations**\n\n```javascript\nmutation Test {\n    tickets: HelpdeskTicket(domain: $domain, vals: {name: $name, description: $description}) {\n        name\n    }\n}\n```\n\nIt will:\n\n* Perform a write if a domain is provided\n* Perform a create if no domain is provided\n  That means `null` value! If you provided an empty list you are going to perfom a write on ALL RECORDS\n\n\n\nThis can be used in the same way in any other languages, as javascript.\nBe aware that this module **DOES NOT HANDLE CORS**, that means that without any other changes, you will only be able to make queries from the Odoo frontend in javascript, but not from an extenal website (see below for more informations).\n\n\n\n## Introspection\n\nIntrospection is not fully working for the moment but works for the integrated [GraphiQL Editor](https://github.com/graphql/graphiql).\nThe editor must **NOT** be active on production database: it exposes your whole database schema, this will help attackers to gain informations about your Odoo. Also, parsing introspection is a lot heavier than normal queries.\n\nTherefore, the GraphiQL Editor AND the introspection in general are **DISABLED BY DEFAULT**.\nTo activate bother the editor and introspection, you need to **create** (it does not exist by default) the `odoo_graphql.introspection` system parameter to `True` (case insensitive)\n\n![introspection_system_parameter](odoo_graphql/img/introspection_system_parameter.png)\n\nNb: To access it: (in developer/debug mode) Settings -\u003e Technical -\u003e System Parameters\n        Then just click \"Create\"\n\n![graphiql](odoo_graphql/static/description/graphiql.png)\n\nGraphiQL is available at `/graphiql` (just that, nothing else)\n![graphiql_url](odoo_graphql/img/graphiql_url.png)\n\n\n\n## External Website\n\nYou may want to create a custom website for your Odoo using modern technolgies as VueJS, ReactJS, ...\nYou can do it without this module using a proxy (E.g.: see my side project [odoo_nginx_proxy](https://github.com/divad1196/odoo_nginx_proxy)) and using the already existings routes and xmlrpc/jsonrpc.\n(Modules allowing it may exists)\n\n\n\nYou will then need to allow many parameters to be able to fetch your Odoo.\n**BUT** all of this is already done for you:\n\nIf you have an url authorizing your website, you may want to use the library provided in this module **graphql.js**\n\n```javascript\nconst odoo = odoo_builder(myurl, \"open-net-test\");  // Nb: myurl is a string\n\n// it provides you with a simple way to login/logout and to retrieve your sessions information\nlet session = await odoo.login(login, password);\n// session = await odoo.session()\nodoo.logout();\n\n// And obviously, it allows you to make graphql queries\nodoo.graphql(\n    myquery,\t   // Mandatory\n    myvariables,   // Optional\n    operationName, // Optional, only usefull for multi-operation document\n)\n```\n\nNb: Those works using the defaults routes of Odoo. If you have changed them using your proxy, you will need to make your own _odoo_builder_. To help you, the __odoo_utils_ structure is made for you.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivad1196%2Fodoo_graphql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdivad1196%2Fodoo_graphql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivad1196%2Fodoo_graphql/lists"}