Autogenerate a graphql schema from sqlalchemy models.
This is the movies and directors schema from the strawberry fastapi-sqlalchemy example.
class Director(Base):
from __future__ import annotations | |
import typing as t | |
import strawberry | |
from sqlmodel import Field, Relationship, SQLModel | |
from .filter_generators import create_array_relationship_type, create_query_root | |
Autogenerate a graphql schema from sqlalchemy models.
This is the movies and directors schema from the strawberry fastapi-sqlalchemy example.
class Director(Base):
import paper from "paper"; | |
import RBush from "rbush"; | |
import knn from "rbush-knn"; | |
// settings | |
// limit at which points are connected | |
// limit at which things are viewed by the mouse | |
/** | |
* radius in which dots are considered nearby |
import { useEffect, useMemo, useRef } from "react"; | |
import { Options, useVirtual as useVirtualImpl } from "react-virtual"; | |
// implementation of useVirtual that handles resizes after the element renders | |
// from https://codesandbox.io/s/usevirtualresizeobserver-04-11-2021-75ye2?file=/src/useVirtual.tsx | |
// found from this issue https://github.com/TanStack/react-virtual/issues/28 | |
// which linked to this comment https://github.com/TanStack/react-virtual/discussions/212#discussioncomment-1587478 | |
const defaultKeyExtractor = (index: number) => index; |
# render `period for system_time` clause for mssql temporal tables | |
# example (specifically pay attention to the info argument passed to sys_end_time) | |
# the render_period has to reference the column names used to track the system start and end time | |
# class Card(Base): | |
# sys_start_time = Column( | |
# DATETIME2, | |
# Computed(text("ROW START HIDDEN")), | |
# nullable=False, | |
# info={"is_temporal": True}, | |
# ) |