Skip to content

Generate APP (list pages) bottom up from (graphql) entities

Past due by about 3 years 33% complete

codegen workflow:

  1. graphql server with enabled introspection is a MUST HAVE (we will use Hasura instance)
  2. run introspection query to get entities and fields (query response types are interesting - we need to filter out also aggregated queries, then we need to filter also select by PK which does not return an array of entities)
  3. choose entities with fields …

codegen workflow:

  1. graphql server with enabled introspection is a MUST HAVE (we will use Hasura instance)
  2. run introspection query to get entities and fields (query response types are interesting - we need to filter out also aggregated queries, then we need to filter also select by PK which does not return an array of entities)
  3. choose entities with fields from introspection query (user can choose entities / fields from introspection query otherwise all entities with all fields without relations will be chosen automatically)
  4. confirm if rewrite (even better patch) generated files
  5. generate queries (*.graphql files) for list page for chosen entities / fields (TODO fragments are important)
  6. run graphql-codegen for queries (*.graphql files) that generates src/generated typescript types (for each query and it's fragments)
  7. generate list page (material-ui/grommet data table) from query response (more precisely typescript types in introspection format)
Loading