Example #1
0
def init_db():

    # Create the fixtures
    user1 = User(firstname='Pjotr', lastname='Johannson')
    user1.save()

    user2 = User(firstname='Peter', lastname='Hanson')
    user2.save()

    user3 = User(firstname='Paul', lastname='Fredrikson')
    user3.save()
Example #2
0
 def mutate(self, info, user_data=None):
     user = UserModel(**user_data)
     user.save(force_insert=True)
     return CreateUser(user=user)