Gatsby / Drupal 8 - getting an image when using the media module (Acquia Lightning install)2019 Community Moderator ElectionConnecting a django application to a drupal database?Can't install Acquia Drupal Commons locallyError in drupal-commons installationInstall module “Devel” on Drupal 8Drupal 8.2.3 installation missing module installationHow to instal modules with Drupal 8 and Composer?Installing Drupal on AWS EC2 with Acquia DB: SQLSTATE[HY000] [2002] Connection refusedDrupal GraphQL integration issuesDrupal - error installing module “entity”Gatsby / Drupal8 decouple: How do I render an image on a Gatsby page that pulls from a Drupal file directory?

두음법칙 - When did North and South diverge in pronunciation of initial ㄹ?

What exactly term 'companion plants' means?

Why is indicated airspeed rather than ground speed used during the takeoff roll?

Can other pieces capture a threatening piece and prevent a checkmate?

Is it insecure to send a password in a `curl` command?

Asserting that Atheism and Theism are both faith based positions

What are substitutions for coconut in curry?

Probably overheated black color SMD pads

Help prove this basic trig identity please!

If "dar" means "to give", what does "daros" mean?

Calculate the frequency of characters in a string

How to terminate ping <dest> &

Print a physical multiplication table

Do I need to consider instance restrictions when showing a language is in P?

Using Past-Perfect interchangeably with the Past Continuous

What can I do if I am asked to learn different programming languages very frequently?

When did antialiasing start being available?

Fewest number of steps to reach 200 using special calculator

Should I be concerned about student access to a test bank?

Turning a hard to access nut?

Would it be believable to defy demographics in a story?

Print last inputted byte

Do native speakers use "ultima" and "proxima" frequently in spoken English?

Bash - pair each line of file



Gatsby / Drupal 8 - getting an image when using the media module (Acquia Lightning install)



2019 Community Moderator ElectionConnecting a django application to a drupal database?Can't install Acquia Drupal Commons locallyError in drupal-commons installationInstall module “Devel” on Drupal 8Drupal 8.2.3 installation missing module installationHow to instal modules with Drupal 8 and Composer?Installing Drupal on AWS EC2 with Acquia DB: SQLSTATE[HY000] [2002] Connection refusedDrupal GraphQL integration issuesDrupal - error installing module “entity”Gatsby / Drupal8 decouple: How do I render an image on a Gatsby page that pulls from a Drupal file directory?










0















On a standard Drupal 8 install using images in a node its fairly easy to get the image via GraphQL. There great examples here:
https://github.com/gatsbyjs/gatsby/tree/master/examples/using-drupal



With the Acquia Lightning install profile (or if you're simply using the Media module I expect) Media is adding images differently, in GraphiQL I see the media field in relationships, the only sub field within that is __typename



 
allNodeBlog
edges
node
relationships
field_media
__typename








I can also look at allMediaImage (or similar), in which I do have access to the images themselves. I can also all the node information in the 'relationships', But i need the node data to be the primary information of course. I don't really understand the best way to tie that query together with the nodes.




allMediaImage
edges
node
relationships
image
localFile
childImageSharp
fluid
...




node__blog
id








I'm hoping that I can create the JSON in a different way perhaps to allow easier access to the images. Otherwise a way of getting the node id first then using that to select the appropriate media. Any ideas










share|improve this question






















  • oddly i can images via media if i look at a particular page (this is just one node though and not the general node type i'm after) nodeBlog relationships node__landing_page relationships field_media relationships image localFile id childImageSharp ...

    – amcc
    Mar 7 at 0:17















0















On a standard Drupal 8 install using images in a node its fairly easy to get the image via GraphQL. There great examples here:
https://github.com/gatsbyjs/gatsby/tree/master/examples/using-drupal



With the Acquia Lightning install profile (or if you're simply using the Media module I expect) Media is adding images differently, in GraphiQL I see the media field in relationships, the only sub field within that is __typename



 
allNodeBlog
edges
node
relationships
field_media
__typename








I can also look at allMediaImage (or similar), in which I do have access to the images themselves. I can also all the node information in the 'relationships', But i need the node data to be the primary information of course. I don't really understand the best way to tie that query together with the nodes.




allMediaImage
edges
node
relationships
image
localFile
childImageSharp
fluid
...




node__blog
id








I'm hoping that I can create the JSON in a different way perhaps to allow easier access to the images. Otherwise a way of getting the node id first then using that to select the appropriate media. Any ideas










share|improve this question






















  • oddly i can images via media if i look at a particular page (this is just one node though and not the general node type i'm after) nodeBlog relationships node__landing_page relationships field_media relationships image localFile id childImageSharp ...

    – amcc
    Mar 7 at 0:17













0












0








0








On a standard Drupal 8 install using images in a node its fairly easy to get the image via GraphQL. There great examples here:
https://github.com/gatsbyjs/gatsby/tree/master/examples/using-drupal



With the Acquia Lightning install profile (or if you're simply using the Media module I expect) Media is adding images differently, in GraphiQL I see the media field in relationships, the only sub field within that is __typename



 
allNodeBlog
edges
node
relationships
field_media
__typename








I can also look at allMediaImage (or similar), in which I do have access to the images themselves. I can also all the node information in the 'relationships', But i need the node data to be the primary information of course. I don't really understand the best way to tie that query together with the nodes.




allMediaImage
edges
node
relationships
image
localFile
childImageSharp
fluid
...




node__blog
id








I'm hoping that I can create the JSON in a different way perhaps to allow easier access to the images. Otherwise a way of getting the node id first then using that to select the appropriate media. Any ideas










share|improve this question














On a standard Drupal 8 install using images in a node its fairly easy to get the image via GraphQL. There great examples here:
https://github.com/gatsbyjs/gatsby/tree/master/examples/using-drupal



With the Acquia Lightning install profile (or if you're simply using the Media module I expect) Media is adding images differently, in GraphiQL I see the media field in relationships, the only sub field within that is __typename



 
allNodeBlog
edges
node
relationships
field_media
__typename








I can also look at allMediaImage (or similar), in which I do have access to the images themselves. I can also all the node information in the 'relationships', But i need the node data to be the primary information of course. I don't really understand the best way to tie that query together with the nodes.




allMediaImage
edges
node
relationships
image
localFile
childImageSharp
fluid
...




node__blog
id








I'm hoping that I can create the JSON in a different way perhaps to allow easier access to the images. Otherwise a way of getting the node id first then using that to select the appropriate media. Any ideas







drupal drupal-8 gatsby acquia






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 6 at 22:04









amccamcc

978




978












  • oddly i can images via media if i look at a particular page (this is just one node though and not the general node type i'm after) nodeBlog relationships node__landing_page relationships field_media relationships image localFile id childImageSharp ...

    – amcc
    Mar 7 at 0:17

















  • oddly i can images via media if i look at a particular page (this is just one node though and not the general node type i'm after) nodeBlog relationships node__landing_page relationships field_media relationships image localFile id childImageSharp ...

    – amcc
    Mar 7 at 0:17
















oddly i can images via media if i look at a particular page (this is just one node though and not the general node type i'm after) nodeBlog relationships node__landing_page relationships field_media relationships image localFile id childImageSharp ...

– amcc
Mar 7 at 0:17





oddly i can images via media if i look at a particular page (this is just one node though and not the general node type i'm after) nodeBlog relationships node__landing_page relationships field_media relationships image localFile id childImageSharp ...

– amcc
Mar 7 at 0:17












0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55032900%2fgatsby-drupal-8-getting-an-image-when-using-the-media-module-acquia-lightni%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55032900%2fgatsby-drupal-8-getting-an-image-when-using-the-media-module-acquia-lightni%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

1928 у кіно

Захаров Федір Захарович

Ель Греко