Comments (4)
let's say you have a collection named posts
then you can do a query like this:
allPosts {
_id,
title
content
}
Greets
Artur
from cockpitql.
Is possible to query nested collection?
I tries this bellow:
query { allCategories { _id, Subcategories { Name } } }
but i'm getting this error bellow:
{ "errors": [ { "message": "Cannot query field \"Subcategories\" on type \"Categories\".", "category": "graphql", "locations": [ { "line": 4, "column": 5 } ] } ] }
But in REST the collection Categories have a nestes Subcategories, so i dont know why this graphql query is not working.
Ps: When i query only for fileds of the root collection, it works.
from cockpitql.
please update to the latest codebase then this should work:
query {
allCategories(populate:1) {
_id,
Subcategories {
Name
}
}
}
from cockpitql.
Ok, great. Thanks for your help.
from cockpitql.
Related Issues (20)
- Linked item does not work HOT 2
- Filter by query variable HOT 3
- Accessing slug variables HOT 2
- Respect cockpit permissions HOT 2
- Dynamic singleton queries
- all{Collection} not being returned in __schema
- Filter by date HOT 1
- How to use this plugin HOT 6
- How to use Graphql in cockpit HOT 4
- Fatal error: Uncaught Error: Call to a member function on() on null in
- Literally no instructions whatsoever. HOT 1
- Can not get fields created by other Addons HOT 2
- Specifying variables object in query param results in 500 error
- Mutation with token HOT 1
- Using the Cockpit CLI for installation is not working HOT 1
- Latest version of Cockpit (10.2) addons are missing from menu HOT 1
- Float field type would be nice to add HOT 2
- Error: "Please implement the index action"
- Lang variable does not propagate to collection links HOT 3
- UI: can't see full CURL
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cockpitql.