How to use the sgqlc.types.Field function in sgqlc

To help you get started, we’ve selected a few sgqlc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github chaoss / grimoirelab-sortinghat / sortinghat / cli / client / schema.py View on Github external
class OperationFilterType(sgqlc.types.Input):
    __schema__ = sh_schema
    __field_names__ = ('ouid', 'op_type', 'entity_type', 'target', 'from_date', 'to_date')
    ouid = sgqlc.types.Field(String, graphql_name='ouid')
    op_type = sgqlc.types.Field(String, graphql_name='opType')
    entity_type = sgqlc.types.Field(String, graphql_name='entityType')
    target = sgqlc.types.Field(String, graphql_name='target')
    from_date = sgqlc.types.Field(DateTime, graphql_name='fromDate')
    to_date = sgqlc.types.Field(DateTime, graphql_name='toDate')


class OrganizationFilterType(sgqlc.types.Input):
    __schema__ = sh_schema
    __field_names__ = ('name',)
    name = sgqlc.types.Field(String, graphql_name='name')


class ProfileInputType(sgqlc.types.Input):
    __schema__ = sh_schema
    __field_names__ = ('name', 'email', 'gender', 'gender_acc', 'is_bot', 'country_code')
    name = sgqlc.types.Field(String, graphql_name='name')
    email = sgqlc.types.Field(String, graphql_name='email')
    gender = sgqlc.types.Field(String, graphql_name='gender')
    gender_acc = sgqlc.types.Field(Int, graphql_name='genderAcc')
    is_bot = sgqlc.types.Field(Boolean, graphql_name='isBot')
    country_code = sgqlc.types.Field(String, graphql_name='countryCode')


class TransactionFilterType(sgqlc.types.Input):
    __schema__ = sh_schema
    __field_names__ = ('tuid', 'name', 'is_closed', 'from_date', 'to_date', 'authored_by')
github chaoss / grimoirelab-sortinghat / sortinghat / cli / client / schema.py View on Github external
class OperationPaginatedType(sgqlc.types.Type):
    __schema__ = sh_schema
    __field_names__ = ('entities', 'page_info')
    entities = sgqlc.types.Field(sgqlc.types.list_of('OperationType'), graphql_name='entities')
    page_info = sgqlc.types.Field('PaginationType', graphql_name='pageInfo')


class OperationType(sgqlc.types.Type):
    __schema__ = sh_schema
    __field_names__ = ('ouid', 'op_type', 'entity_type', 'target', 'trx', 'timestamp', 'args')
    ouid = sgqlc.types.Field(sgqlc.types.non_null(String), graphql_name='ouid')
    op_type = sgqlc.types.Field(sgqlc.types.non_null(OperationOpType), graphql_name='opType')
    entity_type = sgqlc.types.Field(sgqlc.types.non_null(String), graphql_name='entityType')
    target = sgqlc.types.Field(sgqlc.types.non_null(String), graphql_name='target')
    trx = sgqlc.types.Field(sgqlc.types.non_null('TransactionType'), graphql_name='trx')
    timestamp = sgqlc.types.Field(sgqlc.types.non_null(DateTime), graphql_name='timestamp')
    args = sgqlc.types.Field(sgqlc.types.non_null(OperationArgsType), graphql_name='args')


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')
github chaoss / grimoirelab-sortinghat / sortinghat / cli / client / schema.py View on Github external
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):
    __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')
github chaoss / grimoirelab-sortinghat / sortinghat / cli / client / schema.py View on Github external
('data', sgqlc.types.Arg(ProfileInputType, graphql_name='data', default=None)),
            ('uuid', sgqlc.types.Arg(String, graphql_name='uuid', default=None)),
        ))
    )
    move_identity = sgqlc.types.Field(
        MoveIdentity, graphql_name='moveIdentity', args=sgqlc.types.ArgDict((
            ('from_uuid', sgqlc.types.Arg(String, graphql_name='fromUuid', default=None)),
            ('to_uuid', sgqlc.types.Arg(String, graphql_name='toUuid', default=None)),
        ))
    )
    lock_identity = sgqlc.types.Field(
        LockIdentity, graphql_name='lockIdentity', args=sgqlc.types.ArgDict((
            ('uuid', sgqlc.types.Arg(String, graphql_name='uuid', default=None)),
        ))
    )
    unlock_identity = sgqlc.types.Field(
        'UnlockIdentity', graphql_name='unlockIdentity', args=sgqlc.types.ArgDict((
            ('uuid', sgqlc.types.Arg(String, graphql_name='uuid', default=None)),
        ))
    )
    merge_identities = sgqlc.types.Field(
        MergeIdentities, graphql_name='mergeIdentities', args=sgqlc.types.ArgDict((
            ('from_uuids', sgqlc.types.Arg(sgqlc.types.list_of(String), graphql_name='fromUuids', default=None)),
            ('to_uuid', sgqlc.types.Arg(String, graphql_name='toUuid', default=None)),
        ))
    )
    unmerge_identities = sgqlc.types.Field(
        'UnmergeIdentities', graphql_name='unmergeIdentities', args=sgqlc.types.ArgDict((
            ('uuids', sgqlc.types.Arg(sgqlc.types.list_of(String), graphql_name='uuids', default=None)),
        ))
    )
    enroll = sgqlc.types.Field(
github chaoss / grimoirelab-sortinghat / sortinghat / cli / client / schema.py View on Github external
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')


class LockIdentity(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 MergeIdentities(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 MoveIdentity(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 ObtainJSONWebToken(sgqlc.types.Type):
    __schema__ = sh_schema
    __field_names__ = ('token',)
    token = sgqlc.types.Field(String, graphql_name='token')
github chaoss / grimoirelab-sortinghat / sortinghat / cli / client / schema.py View on Github external
class OperationPaginatedType(sgqlc.types.Type):
    __schema__ = sh_schema
    __field_names__ = ('entities', 'page_info')
    entities = sgqlc.types.Field(sgqlc.types.list_of('OperationType'), graphql_name='entities')
    page_info = sgqlc.types.Field('PaginationType', graphql_name='pageInfo')


class OperationType(sgqlc.types.Type):
    __schema__ = sh_schema
    __field_names__ = ('ouid', 'op_type', 'entity_type', 'target', 'trx', 'timestamp', 'args')
    ouid = sgqlc.types.Field(sgqlc.types.non_null(String), graphql_name='ouid')
    op_type = sgqlc.types.Field(sgqlc.types.non_null(OperationOpType), graphql_name='opType')
    entity_type = sgqlc.types.Field(sgqlc.types.non_null(String), graphql_name='entityType')
    target = sgqlc.types.Field(sgqlc.types.non_null(String), graphql_name='target')
    trx = sgqlc.types.Field(sgqlc.types.non_null('TransactionType'), graphql_name='trx')
    timestamp = sgqlc.types.Field(sgqlc.types.non_null(DateTime), graphql_name='timestamp')
    args = sgqlc.types.Field(sgqlc.types.non_null(OperationArgsType), graphql_name='args')


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')
github chaoss / grimoirelab-sortinghat / sortinghat / cli / client / schema.py View on Github external
('name', sgqlc.types.Arg(String, graphql_name='name', default=None)),
        ))
    )
    add_domain = sgqlc.types.Field(
        AddDomain, graphql_name='addDomain', args=sgqlc.types.ArgDict((
            ('domain', sgqlc.types.Arg(String, graphql_name='domain', default=None)),
            ('is_top_domain', sgqlc.types.Arg(Boolean, graphql_name='isTopDomain', default=None)),
            ('organization', sgqlc.types.Arg(String, graphql_name='organization', default=None)),
        ))
    )
    delete_domain = sgqlc.types.Field(
        DeleteDomain, graphql_name='deleteDomain', args=sgqlc.types.ArgDict((
            ('domain', sgqlc.types.Arg(String, graphql_name='domain', default=None)),
        ))
    )
    add_identity = sgqlc.types.Field(
        AddIdentity, graphql_name='addIdentity', args=sgqlc.types.ArgDict((
            ('email', sgqlc.types.Arg(String, graphql_name='email', default=None)),
            ('name', sgqlc.types.Arg(String, graphql_name='name', default=None)),
            ('source', sgqlc.types.Arg(String, graphql_name='source', default=None)),
            ('username', sgqlc.types.Arg(String, graphql_name='username', default=None)),
            ('uuid', sgqlc.types.Arg(String, graphql_name='uuid', default=None)),
        ))
    )
    delete_identity = sgqlc.types.Field(
        DeleteIdentity, graphql_name='deleteIdentity', args=sgqlc.types.ArgDict((
            ('delete_individual', sgqlc.types.Arg(Boolean, graphql_name='deleteIndividual', default=None)),
            ('uuid', sgqlc.types.Arg(String, graphql_name='uuid', default=None)),
        ))
    )
    update_profile = sgqlc.types.Field(
        'UpdateProfile', graphql_name='updateProfile', args=sgqlc.types.ArgDict((
github chaoss / grimoirelab-sortinghat / sortinghat / cli / client / schema.py View on Github external
__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')


class LockIdentity(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 MergeIdentities(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')
github chaoss / grimoirelab-sortinghat / sortinghat / cli / client / schema.py View on Github external
('to_date', sgqlc.types.Arg(DateTime, graphql_name='toDate', default=None)),
            ('uuid', sgqlc.types.Arg(String, graphql_name='uuid', default=None)),
        ))
    )
    token_auth = sgqlc.types.Field(
        ObtainJSONWebToken, graphql_name='tokenAuth', args=sgqlc.types.ArgDict((
            ('username', sgqlc.types.Arg(sgqlc.types.non_null(String), graphql_name='username', default=None)),
            ('password', sgqlc.types.Arg(sgqlc.types.non_null(String), graphql_name='password', default=None)),
        ))
    )
    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')