wasyl
04/02/2024, 3:51 PMApollo-AST
artifact and I can read and parse graphql executable document and schema just fine ๐ But I can't figure out what's the proper way to grab a selection type. For query variables I can see type
field with stuff like GQLNonNullType(GQLNamedType(name = ID))
, but for e.g. fragment selections I only see a name.
I can extract a type manually via (schema.typeDefinitions[fragmentTypeCondition.name] as GQLObjectTypeDefinition).fields[fragmentField.name]
, just wondering if I'm not unnecessarily complicating thingsmbonnin
04/02/2024, 3:57 PMmbonnin
04/02/2024, 3:58 PMmbonnin
04/02/2024, 3:59 PMwasyl
04/02/2024, 4:04 PMwasyl
04/02/2024, 4:04 PMmbonnin
04/02/2024, 4:05 PMmbonnin
04/02/2024, 4:06 PMbtw are there any major changes in these APIs planned in 4.x?There are a few. Most of the
GQLXYz
are basically untouched and get handy superinterfaces for stuff like HasDirectives
, HasDescription
,etc...mbonnin
04/02/2024, 4:06 PMmbonnin
04/02/2024, 4:07 PMFile.toSchema()
and now you have to go through GQLDocument alwayswasyl
04/02/2024, 4:09 PM