Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphQL timezone doesn't match REST API #12611

Closed
tagur87 opened this issue May 15, 2023 · 6 comments
Closed

GraphQL timezone doesn't match REST API #12611

tagur87 opened this issue May 15, 2023 · 6 comments
Labels
topic: GraphQL type: bug A confirmed report of unexpected behavior in the application

Comments

@tagur87
Copy link

tagur87 commented May 15, 2023

NetBox version

3.5.1

Python version

3.8

Steps to Reproduce

  1. Run curl to API endpoint and get the time_zone field from first result
curl -X 'GET' 'http://localhost:8001/api/dcim/sites/'  -H 'accept: application/json' -H 'Content-Type: application/json' \    
  -H 'Authorization: Token 0123456789abcdef0123456789abcdef01234567' | jq -r '.results[0].time_zone'

Asia/Dhaka
  1. Run curl to graphql endpoint for same
curl -X 'POST' 'http://localhost:8001/graphql/'  -H 'accept: application/json' -H 'Content-Type: application/json' \
  -H 'Authorization: Token 0123456789abcdef0123456789abcdef01234567' --data '{"query": "query{site_list{id time_zone}}"}' | jq -r '.data.site_list[0].time_zone' 

ASIA_DHAKA

Expected Behavior

The format of the time_zone field should be the same between the api and the graphql endpoints.

Observed Behavior

The time_zone field formatting is different between the api and graphql endpoints.

@tagur87 tagur87 added the type: bug A confirmed report of unexpected behavior in the application label May 15, 2023
@tagur87
Copy link
Author

tagur87 commented May 15, 2023

Related to #11806 & #7466

@jeremystretch
Copy link
Member

@tagur87 as this has already been discussed under #7466 and abandoned, re-opening the issue will require an owner. Are you willing to commit to doing this work?

@tagur87
Copy link
Author

tagur87 commented May 15, 2023

@tagur87 as this has already been discussed under #7466 and abandoned, re-opening the issue will require an owner. Are you willing to commit to doing this work?

You mentioned originally:

I'm going to close this out both because no work has been done and because it will likely become moot per #9856.

However this never actually went through.

I don't have any ideas of where to start on this. Not sure why the difference? Is it b/c of different libraries used?

@tagur87
Copy link
Author

tagur87 commented May 15, 2023

Ahh, I actually see that django-strawberry issue got reopened....

@jeremystretch
Copy link
Member

Yeah, the intent currently is to replace django-graphene with django-strawberry in v4.0, although work has not yet begun on that initiative.

@jeremystretch jeremystretch added status: under review Further discussion is needed to determine this issue's scope and/or implementation status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation topic: GraphQL and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation labels May 15, 2023
@jeremystretch
Copy link
Member

As this has already been raised and will likely be moot upon adopting django-strawberry, I'm going to close this out.

@jeremystretch jeremystretch closed this as not planned Won't fix, can't repro, duplicate, stale Jun 23, 2023
@jeremystretch jeremystretch removed the status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation label Jun 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
topic: GraphQL type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants