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-source-medium): define types explicitly via createSchemaCustomization (#20069) #22377

Merged

Conversation

Powell-v2
Copy link
Contributor

Description

Use createSchemaCustomization for explicit type declarations in gatsby-source-medium plugin.

Related Issues

Umbrella issue => #20069

@Powell-v2 Powell-v2 requested a review from a team as a code owner March 18, 2020 11:16
@vladar vladar self-assigned this Mar 19, 2020
Copy link
Contributor

@vladar vladar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job! 🎉

One problem is that Medium seems to have several fields that are available conditionally. I took official gatsby medium example and compared schema produced for it against the schema from this PR - and there are some differences. See the diff.

So I suggest the following changes:

  1. Remove @dontInfer directive for now because it may lead to breaking changes. We will probably add it to the next major version of this plugin.
  2. Remove @derivedTypes directive - as it is unnecessary.
  3. Add fields from the diff above to this PR (that gist contains both schema files if you need to make diffs locally).
  4. Make all types uppercase (not sure why some of them are lowercased)?

Please let me know what you think and thanks a lot for the PR! It helps our schema customization initiative a lot!

packages/gatsby-source-medium/src/gatsby-node.js Outdated Show resolved Hide resolved
@vladar vladar added the status: awaiting author response Additional information has been requested from the author label Apr 10, 2020
@vladar
Copy link
Contributor

vladar commented Apr 14, 2020

Awesome, thanks for update! I will try it locally (hopefully tomorrow) and merge.

@vladar vladar removed the status: awaiting author response Additional information has been requested from the author label Apr 14, 2020
Copy link
Contributor

@vladar vladar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Let's ship it 🚢

And thank you for your interest in helping us with schema customization!

@vladar vladar added the bot: merge on green Gatsbot will merge these PRs automatically when all tests passes label Apr 16, 2020
@vladar vladar merged commit 36048cf into gatsbyjs:master Apr 16, 2020
@gatsbot
Copy link

gatsbot bot commented Apr 16, 2020

Holy buckets, @Powell-v2 — we just merged your PR to Gatsby! 💪💜

Gatsby is built by awesome people like you. Let us say “thanks” in two ways:

  1. We’d like to send you some Gatsby swag. As a token of our appreciation, you can go to the Gatsby Swag Store and log in with your GitHub account to get a coupon code good for one free piece of swag. We’ve got Gatsby t-shirts, stickers, hats, scrunchies, and much more. (You can also unlock even more free swag with 5 contributions — wink wink nudge nudge.) See gatsby.dev/swag for details.
  2. We just invited you to join the Gatsby organization on GitHub. This will add you to our team of maintainers. Accept the invite by visiting https://github.com/orgs/gatsbyjs/invitation. By joining the team, you’ll be able to label issues, review pull requests, and merge approved pull requests.

If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’.

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: merge on green Gatsbot will merge these PRs automatically when all tests passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants