graphene-sqlalchemy
                                
                                 graphene-sqlalchemy copied to clipboard
                                
                                    graphene-sqlalchemy copied to clipboard
                            
                            
                            
                        relationships aren't marked as required
given this code:
class Parent(db.Model):
    __tablename__ = "parent"
    id = db.Column(Integer, primary_key=True)
    children = db.relationship("Child", back_populates="parent")
class Child(db.Model):
    __tablename__ = "child"
    id = db.Column(Integer, primary_key=True)
    parent_id = db.Column(Integer, ForeignKey("parent.id"), nullable=False)
    parent = db.relationship("Parent", back_populates="children")
I would expect this to be generated:
type Parent {
  id: ID!
  children: [Child!]!
}
type Child {
  id: ID!
  parent: Parent!
}
However this is what gets generated:
type Parent {
  id: ID!
  children: [Child]
}
type Child {
  id: ID!
  parent: Parent
}
This is a important feature because it simplifies writing the frontend code. I use the graphql code generator with typescript and all I have to consider every time when I use a relationship, if a value could be null or not.
resolved in #367 for :nrelationships. As argued in the PR review, we cannot reliably determine the nullability or non-nullability for :1-relationships just based on the SQLAlchemy model. Client controlled nullability (GQL Spec RFC) will resolve this in the future. For now, you can customize the field type of :1relationship fields using the ORMField.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related topics referencing this issue.