Current progress on T2719, notably, PR #1351: "prototype of an op mode command runner based on type hints and introspection", allow one to automate the creation of corresponding GraphQL schema definition files. The current generating script is linked below. Resolvers (handlers) for these definitions are already dynamically generated, although still requiring that the named resolvers be added by hand to a list; that step will be automated as well, resulting in one only having to run the script to allow server response to any GraphQL op-mode request.
Description
Description
Details
Details
- Difficulty level
- Unknown (require assessment)
- Version
- vyos-1.4
- Why the issue appeared?
- Will be filled on close
- Is it a breaking change?
- Perfectly compatible
- Issue type
- Feature (new functionality)
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | dmbaturin | T2768 Define a high level HTTP API | |||
Resolved | ENHANCEMENT | jestabro | T3993 Extend HTTP API GraphQL support | ||
Resolved | FEATURE REQUEST | dmbaturin | T2719 Standardized op mode script structure | ||
Resolved | ENHANCEMENT | jestabro | T4544 Generate schema definitions from standardized op-mode scripts | ||
Resolved | ENHANCEMENT | jestabro | T4554 Implement GraphQL resolvers for standardized op-mode scripts | ||
Resolved | BUG | jestabro | T4580 Handle the case of op-mode file names with hyphens in GraphQL schema/resolver generation |
Event Timeline
Comment Actions
PR https://github.com/vyos/vyos-1x/pull/1455
curl -k --raw 'https://localhost/graphql' \ -H 'Content-Type: application/json' \ -d '{"query":" {\n ShowVrf (data: {key: \"foo\"}) {\n success\n errors\n data {\n result\n }\n}\n}\n"}'
Getting data:
{"data":{"ShowVrf":{"success":true,"errors":null,"data":{"result":[{"ifname":"foo","operstate":"UP","address":"26:f6:35:05:7e:0a","flags":["NOARP","MASTER","UP","LOWER_UP"]}]}}}}