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

[4.x]: GraphQl not fetching the data properly #14889

Open
Brijeshgrg1999 opened this issue Apr 29, 2024 · 2 comments
Open

[4.x]: GraphQl not fetching the data properly #14889

Brijeshgrg1999 opened this issue Apr 29, 2024 · 2 comments
Assignees

Comments

@Brijeshgrg1999
Copy link

What happened?

Description

GraphQL

  1. I am using craftcms pro currently, during the testing of the Graphql API I am trying to fetch the data but i am getting inconsistent results. If you see , I can get the articleFeaturedImage's URL in the CMS's explorer, but with the same query when i test it on the postman i don't get the URL for the articleFeaturedImage. May I know what am i doing wrong here .

FYI , I already setuped the GraphQL token for that schema .

Expected behavior

Screenshot 2024-04-29 at 4 04 42 PM

Actual behavior

Screenshot 2024-04-29 at 4 16 41 PM

Please help me if anyone have suggestions on this issue . I can provide additional information to clarify more on this .

Craft CMS version

4.8.9

PHP version

8.3.6

Operating system and version

linux 3.10

Database type and version

MariaDB 10.5.24

Image driver and version

No response

Installed plugins and versions

@Brijeshgrg1999
Copy link
Author

HI , btw i am also using amazon s3 to store all of my images , so is it why I am not able to fetch the image due to some restriction on the amazon s3 ?

@i-just
Copy link
Contributor

i-just commented Apr 29, 2024

Hi, thanks for reaching out!

The only way I’m able to replicate this is if I have the devMode set to false and:

  • create a private schema (let’s name it “testing”) which has access to the site(s) for this installation, the hongKongArticle section, normalArticle entry type, all users and the s3 volume used by the articleFeaturedImage field
Screenshot 2024-04-29 at 15 07 05
  • change the Public Schema to have access to the site(s) for this installation, the hongKongArticle section, normalArticle entry type but not the users and not the s3 volume used by the articleFeaturedImage field
Screenshot 2024-04-29 at 15 06 50

If I then query in the “testing” schema in the CMS’s explorer and Public Schema in the Postman I get the results you’re describing.

In your Postman query, are you using the Authorization Bearer Token for the schema you’re using the CMS’s explorer?

@i-just i-just self-assigned this Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants