Shopify / graphql-js-schema

Transforms the JSON representation of a GraphQL schema into a set of ES6 type modules
MIT License
35 stars 12 forks source link

freeze fieldBaseTypes in output #13

Closed jamesmacaulay closed 7 years ago

jamesmacaulay commented 7 years ago

@minasmart please review.

This includes an Object.freeze for the nested fieldBaseTypes of each type in the bundle output. It's included for scalars too (which don't have the fieldBaseTypes property) because I couldn't figure out how to do that conditional logic in the template. It's not really a problem because in those cases it just evaluates to Object.freeze(undefined) which is a no-op.