Questions tagged [graphql]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
28 views

In GraphQL how to query entries where related entry has a specific value

Lets have this query: query test { entries(section: "vacancies") { title ... on vacancies_vacancies_Entry { description organisation { title ... on ...
1
vote
1answer
36 views

How to return custom fields in GraphQL

This is definitely a noob question, but I can't seem to find an answer to this. (Completely new to GraphQL). I'm trying to simply return entries: query test { entries(section: "vacancies", limit: ...
1
vote
1answer
34 views

getting active userid by GraphQL?

I build a SPA with Craft CMS and Vue. I use Vue Router and have three Props. Here is my current router-view: <router-view csrfName="{{craft.app.config.general.csrfTokenName}}" csrfToken="{{...
1
vote
1answer
42 views

GraphQL two image transforms for same field

To get image transform in GraphQL we use this image { url @transform ([width: 300, immediately: true]) } But how do I get two different image transforms (for responsive image) for this asset ...
1
vote
0answers
81 views

Multiple Entry Types on GraphQL Fragment

So I am building out a Gatsby Site, which is using Craft in Headless mode as it's content source. In one Section, I have three entry types. Currently they have identical fields, but may diverge in the ...
0
votes
0answers
46 views

Is it possible to query entries based on values in a table field using GraphQL?

Is there a way to query table values using GraphQL, I see that it's expecting [QueryArgument], but I'm not sure how to use it. I would like to query entries where myTable has a row where col1 (text ...
1
vote
1answer
96 views

GraphQL - Get related entries based on tags field

I'm trying to retrieve entries related to the current entry, based on a tag field called topics. Simple stuff. Now, I use Craft's native GraphQL implementation so I'm bound to the possibilities this ...
1
vote
1answer
30 views

How to loop through Craft CMS query in Angular

Given the following query sample, how can I loop through the entries past the first array in Angular? Here is the query sample: query sample ($section: [String], $type: [String], $slug: [String]) { ...
2
votes
1answer
62 views

How can I retrieve Users of a specific User Group with GraphQL?

I want all the users but filtered by User Group: query getAllUsers { users { id, username } } I cannot see any query parameter on the Schema
1
vote
1answer
36 views

GraphQL private schema returning public schema scope

I am setting up GraphQL on my Craft project, v3.3.16.3 I have a public schema exposing a public entry type, and a private schema exposing a private entry type. When I switch between them in the ...
1
vote
1answer
112 views

How to get previous and next entry using the native GraphQL API?

How do I turn these Craft queries into a GraphQL one? // entry.twig entry.getPrev({ section: "contentHub" }) entry.getNext({ section: "contentHub" }) I want to get the previous and next entry using ...
0
votes
0answers
59 views

How to add custom GraphQL directives?

In addition to the pre-defined directives, is it possible to add more? I need to apply a custom function to a field before GraphQL output. In the documentation, there is a limited list of ...
3
votes
1answer
244 views

Asset field empty in graphql query response

I have a problem with a graphql query which includes an asset field. The asset field is always an empty array. There are no errors in the graphiql tool. The graphql api is not public unfortunately ...
0
votes
0answers
59 views

headless log-In form a different domain

Because I need to mutate my entries headless, i can't use the build in GraphQL. I got it to work to mutate my entries but how can I include a log-in? Because it is a complete different Domain. At the ...
0
votes
0answers
71 views

How to fix the GraphQL “Request header field X-Apollo-Tracing is not allowed by Access-Control-Allow-Headers.” error

I am trying to use https://www.graphqlbin.com to analyze my public GraphQL schema, but it returns the following error message: { "error": "Request header field X-Apollo-Tracing is not allowed by ...
0
votes
0answers
49 views

CraftQL: Upsert Category fails with error

I'm trying to add a category to a Categories relationship field on an entry type called Projects. However, this returns "error": "A non well formed numeric value encountered" Per MutationTest.php -- ...
0
votes
0answers
237 views

Vue + Apollo + CraftQL

I'm starting to dive deeper w/Vue + Apollo + CraftQL but I'm not getting any data on my http://localhost:8080/ but it is mostly working on my Laravel Valet host of https://hybridinteractive.test/test....