Beispiel #1
0
    class Human(ObjectType):
        name = String()
        friends = String()

        @property
        def readonly_prop(self):
            return 'readonly'

        @property
        def write_prop(self):
            return self._write_prop

        @write_prop.setter
        def write_prop(self, value):
            self._write_prop = value
    class Droid(Character):
        name = String()

        def resolve_name(self, *args):
            return 'My Droid'

        tag_resolver(resolve_name, 'test')
class Human(Character):
    '''Human description'''
    friends = String()

    class Meta:
        type_name = 'core_Human'

    @property
    def readonly_prop(self):
        return 'readonly'

    @property
    def write_prop(self):
        return self._write_prop

    @write_prop.setter
    def write_prop(self, value):
        self._write_prop = value
 class Droid(Character):
     name = String()
class Character(Interface):
    '''Character description'''
    name = String()

    class Meta:
        type_name = 'core_Character'
Beispiel #6
0
 class Pet(ObjectType):
     name = String()
Beispiel #7
0
 class Human(ObjectType):
     name = String()
Beispiel #8
0
 class Human(ObjectType):
     '''Human description'''
     name = String()
     friends = String()
Beispiel #9
0
 class Human(ObjectType):
     name = String()
     friends = String()
Beispiel #10
0
    class MyMutation(Mutation):
        '''MyMutation description'''
        class Input:
            arg_name = String()

        name = String()
Beispiel #11
0
 class Input:
     arg_name = String()
Beispiel #12
0
    class Query1(ObjectType):
        field1 = String()

        class Meta:
            abstract = True
Beispiel #13
0
class Character(Interface):
    name = String()
Beispiel #14
0
class Pet(ObjectType):
    type = String()

    def resolve_type(self, args, info):
        return 'Dog'
Beispiel #15
0
 class InputCharacter(InputObjectType):
     '''InputCharacter description'''
     name = String()
Beispiel #16
0
 class Character(Interface):
     '''Character description'''
     name = String()