olavea / Lillian-and-Ola-Vea-com

Lillian-and-Ola-Vea-com
1 stars 0 forks source link

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

Open olavea opened 2 years ago

olavea commented 2 years ago

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:

You DID it! 1/3 of the treasure hunt πŸ’ͺ 😺 πŸ΄β€β˜ οΈ

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:

You DID it! 2/3 of the treasure hunt πŸ’ͺ 😺 πŸ΄β€β˜ οΈ

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!

You DID it! The whole treasure hunt πŸ’ͺ 😺 πŸ΄β€β˜ οΈ