Fixed add stash in notifications panel. Fixed iframe ads breaking page width. Improved actor and movie tile size in search results.
This commit is contained in:
@@ -1,7 +1,50 @@
|
||||
import { fetchEntities } from '../entities.js';
|
||||
import {
|
||||
fetchEntities,
|
||||
fetchEntitiesById,
|
||||
} from '../entities.js';
|
||||
|
||||
export async function fetchEntitiesApi(req, res) {
|
||||
const entities = await fetchEntities(req.query);
|
||||
|
||||
res.send(entities);
|
||||
}
|
||||
|
||||
export const entitiesSchema = `
|
||||
extend type Query {
|
||||
entities(
|
||||
query: String
|
||||
limit: Int! = 30
|
||||
page: Int! = 1
|
||||
): EntitiesResult
|
||||
|
||||
entity(
|
||||
id: Int!
|
||||
): Entity
|
||||
}
|
||||
|
||||
type EntitiesResult {
|
||||
nodes: [Entity]
|
||||
total: Int
|
||||
}
|
||||
|
||||
type Entity {
|
||||
id: Int!
|
||||
name: String
|
||||
slug: String
|
||||
parent: Entity
|
||||
}
|
||||
`;
|
||||
|
||||
export async function fetchEntitiesGraphql(query, _req) {
|
||||
const entities = await fetchEntities(query);
|
||||
|
||||
return {
|
||||
nodes: entities,
|
||||
};
|
||||
}
|
||||
|
||||
export async function fetchEntitiesByIdGraphql(query, _req) {
|
||||
const [entity] = await fetchEntitiesById([query.id]);
|
||||
|
||||
return entity;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user