Skip to content

Having issues with Graphql Fragments  #556

@NeutronScott12

Description

@NeutronScott12
export const MESSAGE_FRAGMENT = gql`
	fragment MessageFragment on Message {
		id
		parentId
		body
		author {
			username
			avatar_url {
				url
			}
		}
	}
`


export const SHOW_CHANNEL_QUERY = gql`
	query ShowChannelQuery($channelId: ID!) {
		showChannel(channelId: $channelId) {
			id
			name
			slug
			messages {
				...MessageFragment
			}
		}
	}
	${MESSAGE_FRAGMENT}
`

Works fine with querying, but when I try to generate types I get a error saying unknown fragment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions