HomePhabricator

(incremental-meta-2) Introduce layer of serializable classes for config type…

Authored by schrockn on Nov 22 2019, 6:57 PM.

Description

(incremental-meta-2) Introduce layer of serializable classes for config type system

Summary:
This introduces a layer of serializable classes that can
capture all the information necessary to rehydrate and return results
for a graphql query.

The most tricky part of the this is the treatement of generics (Set,
List, Optional, and Tuple). I added some helpers in the core config type
system to clarify verbiage. I classify them as "closed generic types".

We want to store the types in a normalized form, but each instance
of the generic type is not a normalized type instance. So we have
a notion of inner types, that is a list of all the contained types
within a given type (e.g. field types for Dicts and type params
for closed generics) but recursively until the algo hits a non-generic
types which are considered leaves.

This makes it so that with a dictionary lookup by key, and all of the
inner types, one can, for example, accurately render a type.

Test Plan: BK

Reviewers: max, alangenfeld

Reviewed By: max

Differential Revision: https://dagster.phacility.com/D1469

Details

Committed
schrocknNov 23 2019, 3:13 PM
Reviewer
max
Differential Revision
D1469: (incremental-meta-2) Introduce layer of serializable classes for config type system
Parents
R1:198beca875dd: (incremental-meta-1) Add Type Kind
Branches
Unknown
Tags
Unknown