create static method

Future<GqlTransport> create({
  1. required GqlConnection gqlConnection,
})

Implementation

static Future<GqlTransport> create({
  required GqlConnection gqlConnection,
}) async {
  final instance = GqlTransport._(gqlConnection);

  final lib = createLib();
  instance.transport = await lib.newStaticMethodGqlTransportImpl(
    gqlConnection: gqlConnection.connection,
  );

  instance.networkId = await instance.getNetworkId();

  instance.connectionParamsHash =
      getHash('gql:${gqlConnection.settings.endpoints.join(',')}');

  return instance;
}