コード例 #1
0
 def create_type():
     return GraphQLObjectType(
         name='WorksheetInstance',
         fields=lambda: {
             'id':
             GraphQLField(
                 type=req(GraphQLID),
                 resolver=lambda obj, args, *_: obj.obj_id(*args),
             ),
             'reportRecordNumber':
             GraphQLField(
                 type=req(GraphQLInt),
                 resolver=lambda obj, args, *_: obj.report_record_number(
                     *args),
             ),
             'worksheetCode':
             GraphQLField(
                 type=req(GraphQLString),
                 resolver=lambda obj, args, *_: obj.worksheet_code(*args),
             ),
             'entries':
             GraphQLField(type=req(
                 list_of(req(GraphQLWorksheetEntry.type())))),
         },
     )
コード例 #2
0
 def create_type():
     return GraphQLInputObjectType(
         name='WorksheetEntryInput',
         fields=lambda: {
             'line': GraphQLInputObjectField(type=req(GraphQLString)),
             'column': GraphQLInputObjectField(type=req(GraphQLString)),
             'value': GraphQLInputObjectField(type=req(GraphQLString)),
         },
     )
コード例 #3
0
 def create_type():
     return GraphQLInputObjectType(
         name='CreateWorksheetInstanceInput',
         fields=lambda: {
             'reportRecordNumber':
             GraphQLInputObjectField(type=req(GraphQLInt)),
             'worksheetCode':
             GraphQLInputObjectField(type=req(GraphQLString)),
             'worksheetEntries':
             GraphQLInputObjectField(type=req(
                 list_of(req(GraphQLWorksheetEntryInput.type())))),
         },
     )
コード例 #4
0
 def create_type():
     return GraphQLObjectType(
         name='Report',
         fields=lambda: {
             'id':
             GraphQLField(
                 type=req(GraphQLID),
                 resolver=lambda obj, args, *_: obj.obj_id(*args),
             ),
             'provider':
             GraphQLField(type=GraphQLProvider.type()),
             'reportRecordNumber':
             GraphQLField(
                 type=req(GraphQLInt),
                 resolver=lambda obj, args, *_: obj.report_record_number(
                     *args),
             ),
             'providerNumber':
             GraphQLField(
                 type=req(GraphQLInt),
                 resolver=lambda obj, args, *_: obj.provider_number(*args),
             ),
             'fiscalIntermediaryNumber':
             GraphQLField(
                 type=req(GraphQLInt),
                 resolver=lambda obj, args, *_: obj.
                 fiscal_intermediary_number(*args),
             ),
             'processDate':
             GraphQLField(
                 type=req(GraphQLDate.type()),
                 resolver=lambda obj, args, *_: obj.process_date(*args),
             ),
             'medicareUtilizationLevel':
             GraphQLField(
                 type=req(GraphQLMedicareUtilizationLevel.type()),
                 resolver=lambda obj, args, *_: obj.
                 medicare_utilization_level(*args).name
                 if obj.medicare_utilization_level(*args) else None,
             ),
             'worksheetInstances':
             GraphQLField(
                 type=req(list_of(req(GraphQLWorksheetInstance.type()))),
                 args={
                     'after': GraphQLArgument(type=GraphQLID),
                     'first': GraphQLArgument(type=GraphQLInt),
                 },
                 resolver=lambda obj, args, *_: obj.worksheet_instances(
                     *args),
             ),
         },
     )
コード例 #5
0
 def create_type():
     return GraphQLInputObjectType(
         name='ProviderCsvRow',
         fields=lambda: {
             'provider': GraphQLInputObjectField(type=req(GraphQLString)),
             'fyb': GraphQLInputObjectField(type=req(GraphQLString)),
             'fye': GraphQLInputObjectField(type=req(GraphQLString)),
             'status': GraphQLInputObjectField(type=req(GraphQLString)),
             'ctrl_type': GraphQLInputObjectField(type=req(GraphQLString)),
             'hosp_name': GraphQLInputObjectField(type=req(GraphQLString)),
             'street_addr': GraphQLInputObjectField(type=GraphQLString),
             'po_box': GraphQLInputObjectField(type=GraphQLString),
             'city': GraphQLInputObjectField(type=req(GraphQLString)),
             'state': GraphQLInputObjectField(type=req(GraphQLString)),
             'zip_code': GraphQLInputObjectField(type=req(GraphQLString)),
             'county': GraphQLInputObjectField(type=GraphQLString),
         },
     )
コード例 #6
0
ファイル: generated.py プロジェクト: schrockn/graphscale_todo
    GraphQLPythonEnumType,
    define_default_resolver,
    define_default_gen_resolver,
    define_pent_mutation_resolver,
)

import graphscale_todo.pent as module_pents

GraphQLQuery = GraphQLObjectType(
    name='Query',
    fields=lambda: {
        'todoUser':
        GraphQLField(
            type=GraphQLTodoUser,  # type: ignore
            args={
                'id': GraphQLArgument(type=req(GraphQLUUID)),  # type: ignore
            },
            resolver=define_default_gen_resolver('gen_todo_user'),
        ),
        'allTodoUsers':
        GraphQLField(
            type=req(list_of(req(GraphQLTodoUser))),  # type: ignore
            args={
                'first': GraphQLArgument(type=GraphQLInt, default_value=100
                                         ),  # type: ignore
                'after': GraphQLArgument(type=GraphQLUUID),  # type: ignore
            },
            resolver=define_default_gen_resolver('gen_all_todo_users'),
        ),
        'todoItem':
        GraphQLField(
コード例 #7
0
 def create_type():
     return GraphQLObjectType(
         name='Provider',
         fields=lambda: {
             'id':
             GraphQLField(
                 type=req(GraphQLID),
                 resolver=lambda obj, args, *_: obj.obj_id(*args),
             ),
             'name':
             GraphQLField(type=req(GraphQLString)),
             'providerNumber':
             GraphQLField(
                 type=req(GraphQLInt),
                 resolver=lambda obj, args, *_: obj.provider_number(*args),
             ),
             'fiscalYearBegin':
             GraphQLField(
                 type=req(GraphQLDate.type()),
                 resolver=lambda obj, args, *_: obj.fiscal_year_begin(*args
                                                                      ),
             ),
             'fiscalYearEnd':
             GraphQLField(
                 type=req(GraphQLDate.type()),
                 resolver=lambda obj, args, *_: obj.fiscal_year_end(*args),
             ),
             'status':
             GraphQLField(
                 type=req(GraphQLProviderStatus.type()),
                 resolver=lambda obj, args, *_: obj.status(*args).name
                 if obj.status(*args) else None,
             ),
             'streetAddress':
             GraphQLField(
                 type=req(GraphQLString),
                 resolver=lambda obj, args, *_: obj.street_address(*args),
             ),
             'poBox':
             GraphQLField(
                 type=req(GraphQLString),
                 resolver=lambda obj, args, *_: obj.po_box(*args),
             ),
             'city':
             GraphQLField(type=req(GraphQLString)),
             'state':
             GraphQLField(type=req(GraphQLString)),
             'zipCode':
             GraphQLField(
                 type=req(GraphQLString),
                 resolver=lambda obj, args, *_: obj.zip_code(*args),
             ),
             'county':
             GraphQLField(type=req(GraphQLString)),
             'reports':
             GraphQLField(
                 type=req(list_of(req(GraphQLReport.type()))),
                 args={
                     'after': GraphQLArgument(type=GraphQLID),
                     'first': GraphQLArgument(type=GraphQLInt),
                 },
             ),
         },
     )
コード例 #8
0
 def create_type():
     return GraphQLInputObjectType(
         name='ReportCsvRow',
         fields=lambda: {
             'rpt_rec_num':
             GraphQLInputObjectField(type=req(GraphQLString)),
             'prvdr_ctrl_type_cd':
             GraphQLInputObjectField(type=req(GraphQLString)),
             'prvdr_num':
             GraphQLInputObjectField(type=req(GraphQLString)),
             'rpt_stus_cd':
             GraphQLInputObjectField(type=req(GraphQLString)),
             'initl_rpt_sw':
             GraphQLInputObjectField(type=req(GraphQLString)),
             'last_rpt_sw':
             GraphQLInputObjectField(type=req(GraphQLString)),
             'trnsmtl_num':
             GraphQLInputObjectField(type=req(GraphQLString)),
             'fi_num':
             GraphQLInputObjectField(type=req(GraphQLString)),
             'adr_vndr_cd':
             GraphQLInputObjectField(type=req(GraphQLString)),
             'util_cd':
             GraphQLInputObjectField(type=req(GraphQLString)),
             'spec_ind':
             GraphQLInputObjectField(type=GraphQLString),
             'npi':
             GraphQLInputObjectField(type=GraphQLString),
             'fy_bgn_dt':
             GraphQLInputObjectField(type=req(GraphQLString)),
             'fy_end_dt':
             GraphQLInputObjectField(type=req(GraphQLString)),
             'proc_dt':
             GraphQLInputObjectField(type=req(GraphQLString)),
             'fi_creat_dt':
             GraphQLInputObjectField(type=req(GraphQLString)),
             'npr_dt':
             GraphQLInputObjectField(type=GraphQLString),
             'fi_rcpt_dt':
             GraphQLInputObjectField(type=req(GraphQLString)),
         },
     )