(self, info, url, description)
| 59 | description = graphene.String() |
| 60 | |
| 61 | def mutate(self, info, url, description): |
| 62 | user = info.context.user or None |
| 63 | |
| 64 | link = Link( |
| 65 | url=url, |
| 66 | description=description, |
| 67 | posted_by=user, |
| 68 | ) |
| 69 | link.save() |
| 70 | |
| 71 | return CreateLink( |
| 72 | id=link.id, |
| 73 | url=link.url, |
| 74 | description=link.description, |
| 75 | posted_by=link.posted_by, |
| 76 | ) |
| 77 | |
| 78 | |
| 79 | class CreateVote(graphene.Mutation): |
nothing calls this directly
no test coverage detected