首页 > 解决方案 > 如何在 Flutter 中过滤 GraphQL 查询中的数据?

问题描述

我在 Flutter 中使用 GraphQL。我没有太多在 Flutter 中使用 GraphQL 的经验。代码如下:

WidgetsFlutterBinding.ensureInitialized();

  final HttpLink link = HttpLink(
   uri: 'https://api.spacex.land/graphql/',
  );

 ValueNotifier<GraphQLClient> client = ValueNotifier(
  GraphQLClient(
  cache: InMemoryCache(),
  link: link,
 ),
);

runApp(MyApp(client: client));
}

我必须通过调用 GraphQL 查询“启动”来执行此公共后端公开的“mission_name”字段过滤:https ://api.spacex.land/graphql/ 。但我不知道该怎么做。如果有人知道该怎么做,请帮助我。谢谢

标签: fluttergraphql

解决方案



推荐阅读