Open denisyilmaz opened 3 years ago
additionally here are the details from the schema.graphql generated via graphql codegen
:
"""This is the interface implemented by all assets."""
type media_Asset implements AssetInterface & ElementInterface {
"""……"""
"""This queries for a single embedded asset."""
embeddedAsset: EmbeddedAssetInterface
"""……"""
}
"""This is the interface implemented by all embedded assets."""
interface EmbeddedAssetInterface {
"""The aspect ratio for the embedded asset."""
aspectRatio: Float
"""The author name for the embedded asset."""
authorName: String
"""The author URL for the embedded asset."""
authorUrl: String
"""The code for the embedded asset."""
code: String
"""The description of the embedded asset."""
description: String
"""The feeds for the embedded asset."""
feeds: [String]
"""The height for the embedded asset."""
height: Int
"""The embed HTML for the embedded asset."""
html: String
"""The image for the embedded asset."""
image: String
"""The image height for the embedded asset."""
imageHeight: Int
"""The image width for the embedded asset."""
imageWidth: Int
"""The images for the embedded asset."""
images: [image]
"""Whether or not the the embed code is safe to use."""
isSafe: Boolean
"""The license for the embedded asset."""
license: String
"""The provider icon for the embedded asset."""
providerIcon: String
"""The provider icons for the embedded asset."""
providerIcons: [image]
"""The provider name for the embedded asset."""
providerName: String
"""The provider URL for the embedded asset."""
providerUrl: String
"""The published time of the embedded asset."""
publishedTime: String
"""The tags for the embedded asset."""
tags: [String]
"""The title of the embedded asset."""
title: String
"""The type of the embedded asset."""
type: String
"""The url of the embedded asset."""
url: String
"""The width for the embedded asset."""
width: Int
}
the resulting types then show the error, the embeddedAsset
gets a type of Maybe<never>
:
export type MediaFragment = (
{ __typename?: 'media_Asset' }
& Pick<Media_Asset, 'title' | 'mimeType' | 'focalPoint' | 'srcset' | 'url' | 'kind' | 'width' | 'height'>
& { embeddedAsset?: Maybe<never> }
);
i checked my setup again to verify that the problem is not to find in Craft CMS or the named Plugin. When i switch my Apollo endpoint to call the Remote Schema directly (with the schema preloaded from Hasura) i can access the field without problems.
Please let me know how i can provide more insights into this issue. But my guess is that it is related to my other issue as well: #6841
We have Craft CMS connected as a Remote Schema in Hasura v2.0.0-alpha.10 which works great. Unfortunatly some sub-fields are not accessible in the Query while the GraphQL Explorer is showing the fields without any error: The query:
Craft CMS GraphQL Explorer:
Hasura GraphQL Explorer:
The plugin in question is https://github.com/spicywebau/craft-embedded-assets As its working in Craft CMS my guess is that the problem is somewhere to find in the Remote Schema implementation.
If this error is unrelated to Hasura please let me know, then i will try to solve the problem with the Plugin-Author.
Thanks!