0xPlaygrounds / 0xPlaygrounds/kg-node

feat(api): Add entity filters for space types

Open
#48 0 comments 0 reactions 1 assignee Claimed by @tourtourigny View on GitHub
enhancement
Dominant language
Rust
Stars
10
Forks
5
PR merge metrics
No merged PRs in 30d

Description

### Description
Add a `where` filter to the `types` field of the `Space` GraphQL type.

**Schema**
```graphql
type SchemaType {
"""Types of the entity (which are entities themselves)"""
types(
where: EntityFilter, # <--------- NEW
first: Int! = 100,
skip: Int! = 0,
strict: Boolean! = true,
): [SchemaType!]!
}
```

**Example query**
```graphql
query {
space(id: "25omwWh6HYgeRQKCaSpVpa") {
# Select the types in the space that are themselves "Property" type
types(where: {
typesContains: ["GscJ2GELQjmLoaVrYyR3xm"]
})
}
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue is about adding a `where` filter to the `types` field in the GraphQL schema for the `Space` type. Look for the GraphQL schema definition in the codebase, likely in a file like `schema.graphql` or within Rust modules using a GraphQL library (e.g., Juniper). Find the `SchemaType` definition and the resolver for the `types` field. Implement the filter logic, ensuring it integrates with existing entity filtering. Test with the provided example query to verify the filter works correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, rust
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.