Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gatsby): allow schema customization #11480

Merged
merged 111 commits into from Mar 19, 2019

Conversation

Projects
None yet
6 participants
@freiksenet
Copy link
Contributor

commented Feb 1, 2019

Rendered release blog post

Is in runnable state right now. Try it:

yarn add gatsby@schema-customization

Report all bugs in #12272.

Description

Related Issues

@freiksenet freiksenet requested a review from gatsbyjs/core as a code owner Feb 1, 2019

freiksenet added some commits Feb 1, 2019

@freiksenet

This comment has been minimized.

Copy link
Contributor Author

commented Feb 4, 2019

My next plans:

  • Confirm www can build
  • Add addTypeDefs and addResolvers apis
  • Put this under a flag
  • Port all tests
  • Make an RFC and try to get feedback
  • Get it merged

Longer term stuff / nice to haves

  • API to add directives
  • Better resolver writing experience
  • Clean up of inference
  • Schema directives to selectively enable/disable inference for types
type: `String!`,
})
})
InternalTC.getITC()

This comment has been minimized.

Copy link
@stefanprobst

stefanprobst Feb 5, 2019

Contributor

Probably not needed now that we use toInputObjectType directly (same with NodeInterface.getITC()) - We called this here to register a non-prefixed name (Nodenput and not MarkdownParentNodeInput - but we should try to remove prefixing upstream)

This comment has been minimized.

Copy link
@freiksenet

freiksenet Feb 12, 2019

Author Contributor

What do you mean by "remove prefixing upstream"?

This comment has been minimized.

Copy link
@stefanprobst

stefanprobst Feb 12, 2019

Contributor

Just not adding the type name here

This comment has been minimized.

Copy link
@freiksenet

freiksenet Feb 12, 2019

Author Contributor

One thing I was thinking about is introducing concept of a "TypeSetComposer" which is an abstraction on top of TypeComporers, InputTypeComposers etc and allows defining dependencies and transformations. Eg we can then write own getITC that knows how to not prefix. This would also solve the issue with clearing the ITC cache.

This comment has been minimized.

Copy link
@stefanprobst

stefanprobst Feb 12, 2019

Contributor

I'll have to think a bit about this, but not sure if we need to do much more than we already have: can we just call tc.removeInputTypeComposer(); tc.getITC() here? What other issues would TypeSetComposer address?

This comment has been minimized.

Copy link
@freiksenet

freiksenet Feb 12, 2019

Author Contributor

I thought it might also have all the other type composers linked, like filter, sort etc. So we could clear all the generated types in one go when original type changes. Could be useful for things like live schema reload.

freiksenet added some commits Mar 18, 2019

@freiksenet freiksenet changed the title [WIP] Schema refactor Schema refactor Mar 18, 2019

DSchau and others added some commits Mar 18, 2019

chore(blog): add schema customization blog post release (#12522)
* chore(blog): add schema customization blog post release

* chore: tweak first sentence

* Update docs/blog/2019-03-18-releasing-new-schema-customization/index.md

Co-Authored-By: DSchau <DSchau@users.noreply.github.com>

* Update docs/blog/2019-03-18-releasing-new-schema-customization/index.md

Co-Authored-By: DSchau <DSchau@users.noreply.github.com>

* Update docs/blog/2019-03-18-releasing-new-schema-customization/index.md

Co-Authored-By: DSchau <DSchau@users.noreply.github.com>

* Update docs/blog/2019-03-18-releasing-new-schema-customization/index.md

Co-Authored-By: DSchau <DSchau@users.noreply.github.com>

* Update docs/blog/2019-03-18-releasing-new-schema-customization/index.md

Co-Authored-By: DSchau <DSchau@users.noreply.github.com>

* Update docs/blog/2019-03-18-releasing-new-schema-customization/index.md

Co-Authored-By: DSchau <DSchau@users.noreply.github.com>

* chore: address feedback

* Update docs/blog/2019-03-18-releasing-new-schema-customization/index.md
Update docs/blog/2019-03-18-releasing-new-schema-customization/index.md
Co-Authored-By: freiksenet <freiksenet@gmail.com>

freiksenet and others added some commits Mar 18, 2019

Update docs/blog/2019-03-18-releasing-new-schema-customization/index.md
Co-Authored-By: freiksenet <freiksenet@gmail.com>

stefanprobst and others added some commits Mar 19, 2019

[schema] Ignore empty strings in example value creation (#12646)
* Ignore empty strings in example value creation
Revert "v2.2.0-rc.2"
This reverts commit 09f0d91.
@pieh

pieh approved these changes Mar 19, 2019

Copy link
Contributor

left a comment

Awesome work on this @freiksenet and @stefanprobst! We were testing and verifying this on multiple open source sites checking if it breaks things and it looks solid right now

@pieh pieh changed the title Schema refactor feat(gatsby): allow schema customization Mar 19, 2019

@freiksenet freiksenet merged commit 07e69be into master Mar 19, 2019

9 of 16 checks passed

ci/circleci: e2e_tests_development_runtime Your tests failed on CircleCI
Details
ci/circleci: e2e_tests_gatsby-image Your tests failed on CircleCI
Details
ci/circleci: e2e_tests_gatsbygram Your tests failed on CircleCI
Details
ci/circleci: e2e_tests_path-prefix Your tests failed on CircleCI
Details
ci/circleci: e2e_tests_production_runtime Your tests failed on CircleCI
Details
ci/circleci: integration_tests_gatsby_pipeline Your tests failed on CircleCI
Details
ci/circleci: integration_tests_long_term_caching Your tests failed on CircleCI
Details
Danger All good
Details
Peril All green. Good on 'ya.
Details
ci/circleci: bootstrap Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: starters_validate Your tests passed on CircleCI!
Details
ci/circleci: unit_tests_node10 Your tests passed on CircleCI!
Details
ci/circleci: unit_tests_node6 Your tests passed on CircleCI!
Details
ci/circleci: unit_tests_node8 Your tests passed on CircleCI!
Details
unit_tests_windows Build #20190319.31 succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.