0

我的问题graphql_social_auth.SocialAuthMutation在下面的课程中

class SocialAuth(graphql_social_auth.SocialAuthMutation):
    class Arguments:
        id = graphene.Int(required=False)
    user = graphene.List(schema.Users)

正在传递一些参数和功能。但是当我添加

class Arguments:
        id = graphene.Int(required=False)

对它,我失去了最初的论点。


我的目标

我想在保留参数和功能的同时传递新参数graphql_social_auth.SocialAuthMutation


如果你看不懂 GraphQL

通常,在 python 和 Django 中,您可以在具有隐藏功能和参数的类中传递功能,models.Model这些功能和参数可帮助您创建模型,而无需显式添加所有代码。

# models.py
class Post(models.Model):
    # in this example if I tryied to use `class Arguments:` the arguments that came from models.Model will not be passed . But what I want is to keep the `models.Model` and add class`class Arguments:` ass well
    description = models.CharField(max_length=9999999)
    title = models.CharField(max_length=200)

4

0 回答 0