Skip to content

Where and how declare fragments? #53

@JSsantana

Description

@JSsantana

I see that ConfigurablePost turns into a fragment, but where and how it should be declared? as a object? as a graphql string? where it should be? inside query property? The docs is not clear.

import { jsonToGraphQLQuery } from 'json-to-graphql-query';

const query = {
    query: {
        Posts: {
            title: true,
            __all_on: [
                "ConfigurablePost",
                "PageInfo"
            ]
        }
    }
};
const graphql_query = jsonToGraphQLQuery(query, { pretty: true });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions