profusion / sgqlc

Simple GraphQL Client
https://sgqlc.readthedocs.io/
ISC License
506 stars 85 forks source link

Added support to UUID #224

Closed neetaBirajdar closed 1 year ago

neetaBirajdar commented 1 year ago

Description

Related Issues

Closes & Solves : #223

Progress

Pull request checklist

How to test it

Now the example given in #223 works as expected.

You can check via python: Note: You can find more in doctests

>>> from sgqlc.types import Type
>>> from sgqlc.types.uuid import UUID

>>> class UUIDTestType(Type):
...     uuid=UUID
... 
>>> UUIDTestType
type UUIDTestType {
  uuid: UUID
}
>>> json_data = {'uuid': UUID('94fda4fb-d574-470b-82e2-0f4ec2a2db20')}
>>> obj = UUIDTestType(json_data)
>>> obj.uuid
UUID('94fda4fb-d574-470b-82e2-0f4ec2a2db20')

Visual reference

Tested with the example given in https://github.com/profusion/sgqlc/issues/223 ( with system ) :

Screenshot 2023-02-27 at 19 21 00
coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 4284899777


Totals Coverage Status
Change from base Build 3622975735: 0.0%
Covered Lines: 1596
Relevant Lines: 1596

💛 - Coveralls
barbieri commented 1 year ago

let me know if you need this to be pip-released, it would be a release with this single commit, so if it's not urgent for you, I'll wait more stuff to queue before I do it.

neetaBirajdar commented 1 year ago

Thanks for merging the PR. It was fun working on it.

Please take your time, it is not urgent at the moment. :)