Skip to content

Instantly share code, notes, and snippets.

@crucialfelix
Created September 3, 2017 13:14
Show Gist options
  • Select an option

  • Save crucialfelix/e099202c665a5723357d3007a659c33b to your computer and use it in GitHub Desktop.

Select an option

Save crucialfelix/e099202c665a5723357d3007a659c33b to your computer and use it in GitHub Desktop.
graphql typescript apollogen
from django.contrib.auth.models import User
from django.db import models
class Message(models.Model):
thread = models.ForeignKey(MessageThread)
author = models.ForeignKey(User)
created_on = models.DateTimeField(db_index=True)
body = models.TextField()
# help_text will appear as a comment in the generated typescript interface
message_type = models.CharField(
max_length=25, help_text="Slug specifying a custom message type.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment