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:] add ImageCDN to queen-raae / gatsby-demo-web-scraping #24

Open
olavea opened this issue May 11, 2022 · 0 comments
Open

[feat:] add ImageCDN to queen-raae / gatsby-demo-web-scraping #24

olavea opened this issue May 11, 2022 · 0 comments
Assignees

Comments

@olavea
Copy link
Owner

olavea commented May 11, 2022

  • G. GraphQL _ _ _ _ _ _ type Tobbie

  • I. Inside what actions.create.... Tobbie?

  • M. Must I add....face( to Tobbie?

G. GraphQL _ _ _ _ _ _ type Tobbie

Give our heroine a fitting name

        name: `....TobbieThumbnail`,

Tobbie is a GraphQL object type of heroine

g1

Guess the right order of this code

interfaces: [`Node`, `RemoteFile`],
name: `....TobbieThumbnail`,
fields: {
  // 🍓
},
schema
.buildObjectType({

g2

I. Inside what actions.create.... Tobbie?

Inside what exports.... will Tobbie live?

exports.createSchemaCustomization = ({ actions, schema }) => {
exports.onCreateNode = ({ gatsbyUtils }) => {

Inside what actions.create.... Tobbie?

actions.createTypes([
actions.createNode(

M. Must I add....face( to Tobbie?

Must I add....face( to Tobbie?

exports.createSchemaCustomization = (gatsbyUtils) => {
  addPollyPiratyParrotInterface(
    actions.createTypes([
exports.createSchemaCustomization = (gatsbyUtils) => {
  addRemoteFilePolyfillInterface(
    actions.createTypes([

Must require gatsby-plugin-….

const {
  addRemoteFilePolyfillInterface,
} = require(
  "gatsby-plugin-tools/polyfill-remote-file"
);
const {
  addRemoteFilePolyfillInterface,
} = require(
  "gatsby-plugin-utils/polyfill-remote-file"
);

You've done these 3 sub-tasks:

  • G. GraphQL _ _ _ _ _ _ type Tobbie

  • I. Inside what actions.create.... Tobbie?

  • M. Must I add....face( to Tobbie?

You DID it! 1/3 of the treasure hunt 💪 😺 🏴‍☠️

  • A. Alice assetNode

  • G. is for GraphiQL where we find 🍓 fields

  • O. is for onCreateDev....?

Alice assetNode is a const ....Node = { height: 630 , width: 1200, }

const .... = {    height: 630 , width: 1200, }

Alice assetNode goes inside which exports....?

exports.onCreateNode = ({ actions }) => {
exports.createSchemaCustomization = ({ actions, schema }) => {

Alice uniDonkey is created with actions.create....?

actions.create....(

G. is for GraphiQL where we find 🍓 fields

{
    height: 630,
    url: allCrowdcastWebinar.node.url,
    mimeType: "image/jpeg",
    parent: node.id,

    width: 1200,
    id: youTubeThumbnailNodeId,
    filename: node.youTubeId + ".jpg",
    internal: {
      type: YOUTUBE_THUMBNAIL_TYPE,
      contentDigest: node.internal.contentDigest,
    },

    youTubeId: node.youTubeId,
}

O. is for onCreateDev....?

exports.onCreateDevS....r = ({ app }) => {};

Inside goes poly....ImageServiceDevRoutes(app);?

poly....ImageServiceDevRoutes(app);

You've done these 3 sub-tasks:

  • A. Alice assetNode

  • G. is for GraphiQL where we find 🍓 fields

  • O. is for onCreateDev....?

You DID it! 2/3 of the treasure hunt 💪 😺 🏴‍☠️

  • C. createNodeId(

  • D. blind date for Tobbie and Alice

  • N. Now you can celbrate!

C. createNodeId(

C. copy :

  const youTubeThumbnailNodeId = createNodeId(
    `${YOUTUBE_THUMBNAIL_TYPE} >>> ${....}`
  );

C. ${....}`

D. blind date for nodes

How can we tell the Crowdcast node to go on a blind date with the CrowdcastThumbnail node?

D. Copy:

const createYouTubeTypes = (gatsbyUtils) => {
  const { actions, schema } = gatsbyUtils;

  actions.createTypes([
    `
    type YouTube implements Node {
      thumbnail: YouTubeThumbnail @link(
        from: "...."
        by: "...."
      )
    }
  `,

D. from: "...." by: "...."

N. is for Now you can celbrate!

  • C. createNodeId(

  • D. blind date for Tobbie and Alice

  • N. Now you can celbrate!

You DID it! The whole treasure hunt 💪 😺 🏴‍☠️

@olavea olavea self-assigned this May 11, 2022
@olavea olavea mentioned this issue May 14, 2022
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant