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

GraphCMS source plugin and usage example #2445

Closed
wants to merge 42 commits into
base: master
from

Conversation

Projects
None yet
7 participants
@rafacm
Copy link

rafacm commented Oct 13, 2017

GraphCMS source plugin and usage example

  1. Includes commits from PR #1867 by @Redmega
  2. Updated the gatsby-source-graphcms plugin documentation and added "Current limitations" section
  3. Added usage example in examples/using-graphcms
  4. Added logic in gatsby-source-graphcms to fail processing if GraphQL query is not passed in configuration

@rafacm rafacm referenced this pull request Oct 13, 2017

Closed

[gatsby-source-graphcms] Add GraphCMS Plugin #1867

0 of 4 tasks complete
@KyleAMathews

This comment has been minimized.

Copy link
Contributor

KyleAMathews commented Oct 13, 2017

@gatsbybot

This comment has been minimized.

Copy link

gatsbybot commented Oct 13, 2017

Deploy preview ready!

Built with commit 9dcd5fe

https://deploy-preview-2445--gatsbygram.netlify.com

@corysimmons

This comment has been minimized.

Copy link
Contributor

corysimmons commented Nov 3, 2017

@KyleAMathews Anything holding this up?

@Redmega

This comment has been minimized.

Copy link

Redmega commented Nov 3, 2017

Issue number 2 in PR #1867 is holding it back. The data isn't found by graphql at build time, despite all the data being pulled in. It might be a simple change to the way createNode is being called -- I haven't had a chance to look at it yet.

There is chat going on in the #gatsby channel at https://graphcms.slack.com

hmeissner and others added some commits Nov 9, 2017

Merge pull request #1 from hmeissner/gatsby-source-graphcms-plugin
Preventing fields being named after 1 of the faulty keywords
@rdela

This comment has been minimized.

Copy link
Contributor

rdela commented Nov 11, 2017

So I built the plugin in this working tree (still no .babelrc) and only babel-cli and babel-plugin-transform-runtime in devDependencies and then set up example site with that build and all looks good so moving on to updating example

@rdela

This comment has been minimized.

Copy link
Contributor

rdela commented Nov 11, 2017

I removed "gatsby-source-graphcms": "0.0.1" from examples/using-graphcms/package.json dependencies during testing, let me know whether I need to add it back or can hold off til merge

@rdela

This comment has been minimized.

Copy link
Contributor

rdela commented Nov 11, 2017

Hmm yarn format-examples may have mangled the jsx in the example index, let me investigate

@rdela

This comment has been minimized.

Copy link
Contributor

rdela commented Nov 11, 2017

Ok I am still stumbling around in the dark with yarn but example code seems to have survived yarn format-examples

Going to add recommended .babelrc and see what, if any, impact that has on builds

@rdela

This comment has been minimized.

Copy link
Contributor

rdela commented Nov 11, 2017

Ok @KyleAMathews think this is ready for your eyes, AWS CodeBuild succeeded at least

rdela added some commits Nov 11, 2017

remove .babelrc + package.json prepublish cross-env
Some more changes to bring this more in line and conform with
existing source plugins and ditch cruft/hopefully appease build
servers. All other source plugins…

- do not have a .babelrc
- have babel-runtime in dependencies not devDependencies
- have "prepublish": "cross-env NODE_ENV=production npm run build"
  in scripts

so experimentally trying these chages
@rdela

This comment has been minimized.

Copy link
Contributor

rdela commented Nov 11, 2017

By gatsby-source-graphcms-plugin devDep combo in that last commit msg I mean babel-plugin-transform-object-rest-spread (in) devDep combo

@rdela

This comment has been minimized.

Copy link
Contributor

rdela commented Nov 11, 2017

Confused about what Babel needs to cover all cases and what is extraneous and unsure whether we have everything here to roll this out, but this is everything I could think to do tonight without more insight, feel free to modify anything I have done here so far

@rdela

This comment has been minimized.

Copy link
Contributor

rdela commented Nov 11, 2017

AWS CodeBuild succeeded for second or third time running so not sure whether any of the last few commits or presence or content of .babelrc make any difference to builds on my system.

Earlier this .babelrc resolved a build issue for me but may be moot now or need to be swapped for recommended package format style .babelrc: https://github.com/gatsbyjs/gatsby/blob/master/plop-templates/package/.babelrc.hbs

Or deleted?bf47613

Some more changes to bring this more in line and conform with
existing source plugins and ditch cruft/hopefully appease build
servers. All other source plugins…

- do not have a .babelrc
- have babel-runtime in dependencies not devDependencies
- have "prepublish": "cross-env NODE_ENV=production npm run build"
  in scripts

Travis seems stuck and netlify build is failing, but think that may be unsatisfied dep for 0.0.1 of this plugin in example. Curious what are real issues and need attention and what will resolve once published.

@rdela

This comment has been minimized.

Copy link
Contributor

rdela commented Nov 11, 2017

I guess I need to read up on Lerna hoisting to figure out Babel dev/production logic in Gatsby

@rdela

This comment has been minimized.

Copy link
Contributor

rdela commented Nov 13, 2017

@KyleAMathews what do you need me to do here? Fix something specific? Merge current master into this branch? Get @Redmega to reopen PR #1867? @hmeissner or me open a new PR with clean tree based on current? We are working on new features but dev is getting splintered with https://github.com/hmeissner/gatsby-graphcms-testing being more up to date and approachable. With so many different people having now committed to the brach over 2 PRs and not knowing lerna or build setups I am a little lost. I wrote in Slack:

This branch has diverged so much and had so many commits added in 2 PRs now it’s hard to tell where breakage began

@rdela

This comment has been minimized.

Copy link
Contributor

rdela commented Nov 13, 2017

I guess 3c5df69 was last successful build on Oct 13 #2445 (commits)

@KyleAMathews

This comment has been minimized.

Copy link
Contributor

KyleAMathews commented Nov 13, 2017

Hey! First thanks for all the great work here! Sorry about the confusion AWS CodeBuild is causing — I'm working on a new testing tool and it's a WIP still so giving weird results.

I've been thinking too lately that our experiment in putting lots of plugins in this repo is getting unwieldy — I'm reaching my limits for how much maintenance I can do.

How about you put this in your own repo or perhaps a GraphQLCMS repo?

A community member is working on a design for a new plugins page that'll make it really easy to browse/search plugins so it won't be that big of deal anymore which repo plugins come from.

Thoughts?

@Redmega

This comment has been minimized.

Copy link

Redmega commented Nov 13, 2017

I definitely don't have a problem hosting this repo on my own github and publishing to npm separately. I can work on that after work tonight if everyone thinks we're ready to go live with 0.0.1.

@Redmega

This comment has been minimized.

Copy link

Redmega commented Nov 13, 2017

@KyleAMathews We're going to host it in the @GraphCMS org.

@KyleAMathews

This comment has been minimized.

Copy link
Contributor

KyleAMathews commented Nov 13, 2017

Sweet!!

@rdela

This comment has been minimized.

Copy link
Contributor

rdela commented Nov 13, 2017

Yeah I am super pro all these things @Redmega and @KyleAMathews thank you both let’s close this please!

@rdela

This comment has been minimized.

Copy link
Contributor

rdela commented Nov 13, 2017

Or we can wait until 0.0.1 is on npm and then add comment here before closing whatever is clever

@rdela

This comment has been minimized.

Copy link
Contributor

rdela commented Nov 13, 2017

@rdela

This comment has been minimized.

Copy link
Contributor

rdela commented Nov 14, 2017

@corysimmons please let us know if you want to be more involved or have thoughts on alpha https://github.com/GraphCMS/gatsby-source-graphcms / hmeissner/gatsby-graphcms-testing#2

@rafacm

This comment has been minimized.

Copy link

rafacm commented Nov 14, 2017

@KyleAMathews said:
I've been thinking too lately that our experiment in putting lots of plugins in this repo is
getting unwieldy — I'm reaching my limits for how much maintenance I can do.

New repo created at https://github.com/GraphCMS/gatsby-source-graphcms and all commits for this PR pushed there.

@rafacm rafacm closed this Nov 14, 2017

rdela added a commit to GraphCMS/gatsby-graphcms-example that referenced this pull request Nov 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment