Restart required to view new Relationship in GraphQL
See original GitHub issueEnvironment
- Python version: 3.8.5
- Nautobot version: 1.0.1
Steps to Reproduce
- Create a new Relationship e.g. between dcim.device and ipam.vlan called
device_vlan
- Go to the GraphiQL interface
- Query for all devices and include the relationship attribute created in step 1 e.g.
{
devices{
rel_device_vlan {
id
}
}
}
Expected Behavior
The relationship attribute (e.g. rel_device_vlan
) is available for selection the GraphIQL interface and is processed and values returned as part of the query.
Observed Behavior
The relationship attribute (e.g. rel_device_vlan
) is not available on the models as per definition. If the relationship attribute is entered into the query without predictive text, the error below is reported.
The nautobot service needs to be restarted for the relationship to be loaded and be available for querying.
{
"errors": [
{
"message": "Cannot query field \"rel_device_vlan\" on type \"DeviceType\".",
"locations": [
{
"line": 37,
"column": 5
}
]
}
]
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
GraphQL schema stitching
In this article I'd like to present a new way GraphQL can help you describe your data and make it more easily accessible....
Read more >Five Common Problems in GraphQL Apps (And How to Fix ...
Solution: GraphQL Schema Generation A number of solutions to this problem have emerged in the GraphQL ecosystem. For example, PostGraphile ...
Read more >Graphql-ruby: Need to restart Rails server every time when ...
When I make changes to the graphql query_type or any other graphql related files such as(graphql_controller, type files, etc), I need to ...
Read more >A Practical GraphQL Getting Started Guide with Node.js and ...
js that will require restarting the node server to reflect the latest changes. Visit localhost:4000/graphql in a web browser. You will see a ......
Read more >Table permissions and relationships are reverted after some time ...
I have created new table, and update the permissions and relationships with other tables. ... If you do not export your metadata, and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Probably also an issue with other “dynamic” schema content - custom fields, computed fields in particular.
Note that the test case
test_query_relationship_associations
innautobot/core/tests/test_graphql.py
(added by #1230) is currently skipped due to this issue. When this issue is fixed, that test case should be re-enabled and validated.