Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
bio = str
class Organization(Type, Actor):
location = str
class Issue(Type):
number = int
title = str
created_at = DateTime
author = Actor
class IssueConnection(Connection): # Connection provides page_info!
nodes = list_of(Issue)
class Repository(Type):
issues = Field(IssueConnection, args=connection_args())
class Query(Type): # GraphQL's root
repository = Field(Repository, args={'owner': str, 'name': str})
try:
token, repo = sys.argv[1:]
except ValueError:
raise SystemExit('Usage: ')
url = 'https://api.github.com/graphql'
__schema__ = sh_schema
__field_names__ = ('entities', 'page_info')
entities = sgqlc.types.Field(sgqlc.types.list_of('TransactionType'), graphql_name='entities')
page_info = sgqlc.types.Field(PaginationType, graphql_name='pageInfo')
class TransactionType(sgqlc.types.Type):
__schema__ = sh_schema
__field_names__ = ('tuid', 'name', 'created_at', 'closed_at', 'is_closed', 'authored_by', 'operations')
tuid = sgqlc.types.Field(sgqlc.types.non_null(String), graphql_name='tuid')
name = sgqlc.types.Field(sgqlc.types.non_null(String), graphql_name='name')
created_at = sgqlc.types.Field(sgqlc.types.non_null(DateTime), graphql_name='createdAt')
closed_at = sgqlc.types.Field(DateTime, graphql_name='closedAt')
is_closed = sgqlc.types.Field(sgqlc.types.non_null(Boolean), graphql_name='isClosed')
authored_by = sgqlc.types.Field(String, graphql_name='authoredBy')
operations = sgqlc.types.Field(sgqlc.types.list_of(OperationType), graphql_name='operations')
class IndividualType(sgqlc.types.Type):
__schema__ = sh_schema
__field_names__ = ('created_at', 'last_modified', 'mk', 'is_locked', 'identities', 'profile', 'enrollments')
created_at = sgqlc.types.Field(sgqlc.types.non_null(DateTime), graphql_name='createdAt')
last_modified = sgqlc.types.Field(sgqlc.types.non_null(DateTime), graphql_name='lastModified')
mk = sgqlc.types.Field(sgqlc.types.non_null(String), graphql_name='mk')
is_locked = sgqlc.types.Field(sgqlc.types.non_null(Boolean), graphql_name='isLocked')
identities = sgqlc.types.Field(sgqlc.types.list_of(IdentityType), graphql_name='identities')
profile = sgqlc.types.Field(ProfileType, graphql_name='profile')
enrollments = sgqlc.types.Field(sgqlc.types.list_of(EnrollmentType), graphql_name='enrollments')
class UnlockIdentity(sgqlc.types.Type):
__schema__ = sh_schema
class OrganizationPaginatedType(sgqlc.types.Type):
__schema__ = sh_schema
__field_names__ = ('entities', 'page_info')
entities = sgqlc.types.Field(sgqlc.types.list_of('OrganizationType'), graphql_name='entities')
page_info = sgqlc.types.Field('PaginationType', graphql_name='pageInfo')
class OrganizationType(sgqlc.types.Type):
__schema__ = sh_schema
__field_names__ = ('id', 'created_at', 'last_modified', 'name', 'domains', 'enrollments')
id = sgqlc.types.Field(sgqlc.types.non_null(ID), graphql_name='id')
created_at = sgqlc.types.Field(sgqlc.types.non_null(DateTime), graphql_name='createdAt')
last_modified = sgqlc.types.Field(sgqlc.types.non_null(DateTime), graphql_name='lastModified')
name = sgqlc.types.Field(sgqlc.types.non_null(String), graphql_name='name')
domains = sgqlc.types.Field(sgqlc.types.list_of(DomainType), graphql_name='domains')
enrollments = sgqlc.types.Field(sgqlc.types.list_of(EnrollmentType), graphql_name='enrollments')
class PaginationType(sgqlc.types.Type):
__schema__ = sh_schema
__field_names__ = (
'page', 'page_size', 'num_pages', 'has_next', 'has_prev', 'start_index', 'end_index', 'total_results'
)
page = sgqlc.types.Field(Int, graphql_name='page')
page_size = sgqlc.types.Field(Int, graphql_name='pageSize')
num_pages = sgqlc.types.Field(Int, graphql_name='numPages')
has_next = sgqlc.types.Field(Boolean, graphql_name='hasNext')
has_prev = sgqlc.types.Field(Boolean, graphql_name='hasPrev')
start_index = sgqlc.types.Field(Int, graphql_name='startIndex')
end_index = sgqlc.types.Field(Int, graphql_name='endIndex')
total_results = sgqlc.types.Field(Int, graphql_name='totalResults')
__schema__ = sh_schema
__field_names__ = ('uuid', 'individual')
uuid = sgqlc.types.Field(String, graphql_name='uuid')
individual = sgqlc.types.Field('IndividualType', graphql_name='individual')
class AddOrganization(sgqlc.types.Type):
__schema__ = sh_schema
__field_names__ = ('organization',)
organization = sgqlc.types.Field('OrganizationType', graphql_name='organization')
class CountryPaginatedType(sgqlc.types.Type):
__schema__ = sh_schema
__field_names__ = ('entities', 'page_info')
entities = sgqlc.types.Field(sgqlc.types.list_of('CountryType'), graphql_name='entities')
page_info = sgqlc.types.Field('PaginationType', graphql_name='pageInfo')
class CountryType(sgqlc.types.Type):
__schema__ = sh_schema
__field_names__ = ('created_at', 'last_modified', 'code', 'name', 'alpha3', 'profile_set')
created_at = sgqlc.types.Field(sgqlc.types.non_null(DateTime), graphql_name='createdAt')
last_modified = sgqlc.types.Field(sgqlc.types.non_null(DateTime), graphql_name='lastModified')
code = sgqlc.types.Field(sgqlc.types.non_null(String), graphql_name='code')
name = sgqlc.types.Field(sgqlc.types.non_null(String), graphql_name='name')
alpha3 = sgqlc.types.Field(sgqlc.types.non_null(String), graphql_name='alpha3')
profile_set = sgqlc.types.Field(sgqlc.types.list_of('ProfileType'), graphql_name='profileSet')
class DeleteDomain(sgqlc.types.Type):
__schema__ = sh_schema
class OrganizationPaginatedType(sgqlc.types.Type):
__schema__ = sh_schema
__field_names__ = ('entities', 'page_info')
entities = sgqlc.types.Field(sgqlc.types.list_of('OrganizationType'), graphql_name='entities')
page_info = sgqlc.types.Field('PaginationType', graphql_name='pageInfo')
class OrganizationType(sgqlc.types.Type):
__schema__ = sh_schema
__field_names__ = ('id', 'created_at', 'last_modified', 'name', 'domains', 'enrollments')
id = sgqlc.types.Field(sgqlc.types.non_null(ID), graphql_name='id')
created_at = sgqlc.types.Field(sgqlc.types.non_null(DateTime), graphql_name='createdAt')
last_modified = sgqlc.types.Field(sgqlc.types.non_null(DateTime), graphql_name='lastModified')
name = sgqlc.types.Field(sgqlc.types.non_null(String), graphql_name='name')
domains = sgqlc.types.Field(sgqlc.types.list_of(DomainType), graphql_name='domains')
enrollments = sgqlc.types.Field(sgqlc.types.list_of(EnrollmentType), graphql_name='enrollments')
class PaginationType(sgqlc.types.Type):
__schema__ = sh_schema
__field_names__ = (
'page', 'page_size', 'num_pages', 'has_next', 'has_prev', 'start_index', 'end_index', 'total_results'
)
page = sgqlc.types.Field(Int, graphql_name='page')
page_size = sgqlc.types.Field(Int, graphql_name='pageSize')
num_pages = sgqlc.types.Field(Int, graphql_name='numPages')
has_next = sgqlc.types.Field(Boolean, graphql_name='hasNext')
has_prev = sgqlc.types.Field(Boolean, graphql_name='hasPrev')
start_index = sgqlc.types.Field(Int, graphql_name='startIndex')
end_index = sgqlc.types.Field(Int, graphql_name='endIndex')
total_results = sgqlc.types.Field(Int, graphql_name='totalResults')
name = sgqlc.types.Field(sgqlc.types.non_null(String), graphql_name='name')
created_at = sgqlc.types.Field(sgqlc.types.non_null(DateTime), graphql_name='createdAt')
closed_at = sgqlc.types.Field(DateTime, graphql_name='closedAt')
is_closed = sgqlc.types.Field(sgqlc.types.non_null(Boolean), graphql_name='isClosed')
authored_by = sgqlc.types.Field(String, graphql_name='authoredBy')
operations = sgqlc.types.Field(sgqlc.types.list_of(OperationType), graphql_name='operations')
class IndividualType(sgqlc.types.Type):
__schema__ = sh_schema
__field_names__ = ('created_at', 'last_modified', 'mk', 'is_locked', 'identities', 'profile', 'enrollments')
created_at = sgqlc.types.Field(sgqlc.types.non_null(DateTime), graphql_name='createdAt')
last_modified = sgqlc.types.Field(sgqlc.types.non_null(DateTime), graphql_name='lastModified')
mk = sgqlc.types.Field(sgqlc.types.non_null(String), graphql_name='mk')
is_locked = sgqlc.types.Field(sgqlc.types.non_null(Boolean), graphql_name='isLocked')
identities = sgqlc.types.Field(sgqlc.types.list_of(IdentityType), graphql_name='identities')
profile = sgqlc.types.Field(ProfileType, graphql_name='profile')
enrollments = sgqlc.types.Field(sgqlc.types.list_of(EnrollmentType), graphql_name='enrollments')
class UnlockIdentity(sgqlc.types.Type):
__schema__ = sh_schema
__field_names__ = ('uuid', 'individual')
uuid = sgqlc.types.Field(String, graphql_name='uuid')
individual = sgqlc.types.Field(IndividualType, graphql_name='individual')
class UnmergeIdentities(sgqlc.types.Type):
__schema__ = sh_schema
__field_names__ = ('uuids', 'individuals')
uuids = sgqlc.types.Field(sgqlc.types.list_of(String), graphql_name='uuids')
individuals = sgqlc.types.Field(sgqlc.types.list_of(IndividualType), graphql_name='individuals')
class EnrollmentType(sgqlc.types.Type):
__schema__ = sh_schema
__field_names__ = ('created_at', 'last_modified', 'id', 'individual', 'organization', 'start', 'end')
created_at = sgqlc.types.Field(sgqlc.types.non_null(DateTime), graphql_name='createdAt')
last_modified = sgqlc.types.Field(sgqlc.types.non_null(DateTime), graphql_name='lastModified')
id = sgqlc.types.Field(sgqlc.types.non_null(ID), graphql_name='id')
individual = sgqlc.types.Field(sgqlc.types.non_null('IndividualType'), graphql_name='individual')
organization = sgqlc.types.Field(sgqlc.types.non_null('OrganizationType'), graphql_name='organization')
start = sgqlc.types.Field(sgqlc.types.non_null(DateTime), graphql_name='start')
end = sgqlc.types.Field(sgqlc.types.non_null(DateTime), graphql_name='end')
class IdentityPaginatedType(sgqlc.types.Type):
__schema__ = sh_schema
__field_names__ = ('entities', 'page_info')
entities = sgqlc.types.Field(sgqlc.types.list_of('IndividualType'), graphql_name='entities')
page_info = sgqlc.types.Field('PaginationType', graphql_name='pageInfo')
class IdentityType(sgqlc.types.Type):
__schema__ = sh_schema
__field_names__ = ('created_at', 'last_modified', 'uuid', 'name', 'email', 'username', 'source', 'individual')
created_at = sgqlc.types.Field(sgqlc.types.non_null(DateTime), graphql_name='createdAt')
last_modified = sgqlc.types.Field(sgqlc.types.non_null(DateTime), graphql_name='lastModified')
uuid = sgqlc.types.Field(sgqlc.types.non_null(String), graphql_name='uuid')
name = sgqlc.types.Field(String, graphql_name='name')
email = sgqlc.types.Field(String, graphql_name='email')
username = sgqlc.types.Field(String, graphql_name='username')
source = sgqlc.types.Field(sgqlc.types.non_null(String), graphql_name='source')
individual = sgqlc.types.Field(sgqlc.types.non_null('IndividualType'), graphql_name='individual')
identities = sgqlc.types.Field(sgqlc.types.list_of(IdentityType), graphql_name='identities')
profile = sgqlc.types.Field(ProfileType, graphql_name='profile')
enrollments = sgqlc.types.Field(sgqlc.types.list_of(EnrollmentType), graphql_name='enrollments')
class UnlockIdentity(sgqlc.types.Type):
__schema__ = sh_schema
__field_names__ = ('uuid', 'individual')
uuid = sgqlc.types.Field(String, graphql_name='uuid')
individual = sgqlc.types.Field(IndividualType, graphql_name='individual')
class UnmergeIdentities(sgqlc.types.Type):
__schema__ = sh_schema
__field_names__ = ('uuids', 'individuals')
uuids = sgqlc.types.Field(sgqlc.types.list_of(String), graphql_name='uuids')
individuals = sgqlc.types.Field(sgqlc.types.list_of(IndividualType), graphql_name='individuals')
class UpdateProfile(sgqlc.types.Type):
__schema__ = sh_schema
__field_names__ = ('uuid', 'individual')
uuid = sgqlc.types.Field(String, graphql_name='uuid')
individual = sgqlc.types.Field(IndividualType, graphql_name='individual')
class Verify(sgqlc.types.Type):
__schema__ = sh_schema
__field_names__ = ('payload',)
payload = sgqlc.types.Field(GenericScalar, graphql_name='payload')
verify_token = sgqlc.types.Field(
'Verify', graphql_name='verifyToken', args=sgqlc.types.ArgDict((
('token', sgqlc.types.Arg(sgqlc.types.non_null(String), graphql_name='token', default=None)),
))
)
refresh_token = sgqlc.types.Field(
Refresh, graphql_name='refreshToken', args=sgqlc.types.ArgDict((
('token', sgqlc.types.Arg(sgqlc.types.non_null(String), graphql_name='token', default=None)),
))
)
class TransactionPaginatedType(sgqlc.types.Type):
__schema__ = sh_schema
__field_names__ = ('entities', 'page_info')
entities = sgqlc.types.Field(sgqlc.types.list_of('TransactionType'), graphql_name='entities')
page_info = sgqlc.types.Field(PaginationType, graphql_name='pageInfo')
class TransactionType(sgqlc.types.Type):
__schema__ = sh_schema
__field_names__ = ('tuid', 'name', 'created_at', 'closed_at', 'is_closed', 'authored_by', 'operations')
tuid = sgqlc.types.Field(sgqlc.types.non_null(String), graphql_name='tuid')
name = sgqlc.types.Field(sgqlc.types.non_null(String), graphql_name='name')
created_at = sgqlc.types.Field(sgqlc.types.non_null(DateTime), graphql_name='createdAt')
closed_at = sgqlc.types.Field(DateTime, graphql_name='closedAt')
is_closed = sgqlc.types.Field(sgqlc.types.non_null(Boolean), graphql_name='isClosed')
authored_by = sgqlc.types.Field(String, graphql_name='authoredBy')
operations = sgqlc.types.Field(sgqlc.types.list_of(OperationType), graphql_name='operations')
class IndividualType(sgqlc.types.Type):
class CountryPaginatedType(sgqlc.types.Type):
__schema__ = sh_schema
__field_names__ = ('entities', 'page_info')
entities = sgqlc.types.Field(sgqlc.types.list_of('CountryType'), graphql_name='entities')
page_info = sgqlc.types.Field('PaginationType', graphql_name='pageInfo')
class CountryType(sgqlc.types.Type):
__schema__ = sh_schema
__field_names__ = ('created_at', 'last_modified', 'code', 'name', 'alpha3', 'profile_set')
created_at = sgqlc.types.Field(sgqlc.types.non_null(DateTime), graphql_name='createdAt')
last_modified = sgqlc.types.Field(sgqlc.types.non_null(DateTime), graphql_name='lastModified')
code = sgqlc.types.Field(sgqlc.types.non_null(String), graphql_name='code')
name = sgqlc.types.Field(sgqlc.types.non_null(String), graphql_name='name')
alpha3 = sgqlc.types.Field(sgqlc.types.non_null(String), graphql_name='alpha3')
profile_set = sgqlc.types.Field(sgqlc.types.list_of('ProfileType'), graphql_name='profileSet')
class DeleteDomain(sgqlc.types.Type):
__schema__ = sh_schema
__field_names__ = ('domain',)
domain = sgqlc.types.Field('DomainType', graphql_name='domain')
class DeleteIdentity(sgqlc.types.Type):
__schema__ = sh_schema
__field_names__ = ('uuid', 'individual')
uuid = sgqlc.types.Field(String, graphql_name='uuid')
individual = sgqlc.types.Field('IndividualType', graphql_name='individual')
class DeleteOrganization(sgqlc.types.Type):