Define useful types
Define useful types

- Separate workspace schema into subschemas, each with their own type:
  - Identify portion of workspace schema representing resource queries
    (e.g. `workspace { contract(id) { ... } }`; identified as `R`)

  - Identify portion of workspace schema representing collection queries
    (e.g. `workspace { contracts { ... } }`; identified as `C`)

  - Identify portion of workspace schema representing mutations
    (e.g. `workspace { sourcesAdd(input) { ... } }`; identified as `M`)

- Specify ResourceName<R> type as computed type for all resource names
  in a given schema R (e.g. "contract", "bytecode", etc.)

- Specify CollectionName<C> type as computed type for all collection names
  in a given schema C (e.g. "contracts", "bytecodes", etc.)

- Specify MutationName<M> type as computed type for all mutation names
  in a given schema M (e.g. "sourcesAdd", "contractsAdd", etc.)

- Define mapping type from collection name type to resource name type
  (identified as `CR`)

- Define mapping type from collection name type to pair
    { mutation name type, mutation input type }
  (identified as `CM`)

ConsenSys/truffle