Tag: #flutter
-
How to close the websocket in graphql config flutter?
1 class GraphqlConfig { final serverLink = Link.split( (request) => request.isSubscription, WebSocketLink( "mylink" ), HttpLink("mylink", defaultHeaders: <String, String>{ })); initClient() { ValueNotifier<GraphQLClient> client = ValueNotifier( GraphQLClient( link: serverLink, cache: GraphQLCache(), ), ); return client; } GraphQLClient clientToQuery() { return GraphQLClient( cache: GraphQLCache(), link: serverLink, ); } } I got the following exception DOMException: Failed to…
-
The problem of cyclic dependence in constructing the links between AuthService and FreshLink for OAuth2.0 authorization in GraphQL in Flutter
0 In my project, I use the fresh_graphql package to refresh tokens at the GraphQLClient link level. This package adds the access token to headers, manages token storage, and handles authorization errors, after which it refreshes the tokens. I plan to create a similar link that will only add tokens to headers and handle authorization…
-
GraphQL and Bloc in Flutter
0 So im trying to implement graphql in flutter, using bloc too. I think i already did all the necessary part, but when i try to hit the graphql, it return response like this HttpLinkParserException (ResponseFormatException(originalException: FormatException: Unexpected character (at character 1) here is my graphql function – void _onLoginButtonPressed( LoginButtonPressed event, Emitter<LoginState> emit) async…
-
GraphQL in Flutter
0 So im trying to implement graphql in flutter, using bloc too. I think i already did all the necessary part, but when i try to hit the graphql, it return response like this HttpLinkParserException (ResponseFormatException(originalException: FormatException: Unexpected character (at character 1) here is my graphql function – void _onLoginButtonPressed( LoginButtonPressed event, Emitter<LoginState> emit) async…
-
HttpLinkParserException using GraphQL in Flutter
0 So im trying to implement graphql in flutter, using bloc too. I think i already did all the necessary part, but when i try to hit the graphql, it return response like this HttpLinkParserException (ResponseFormatException(originalException: FormatException: Unexpected character (at character 1) here is my graphql function – void _onLoginButtonPressed( LoginButtonPressed event, Emitter<LoginState> emit) async…
-
how i can create a function in flutter using graphQL to register a user in supabase platform?
-2 the problem is specifically related to user registration using GraphQL on the Supabase platform, and you’re seeking help to resolve it. this the function i use Future<void> registerEmployee( String email, String password, BuildContext context) async { try { setIsLoading = true; if (email.isEmpty || password.isEmpty) { throw ‘All Fields are required’; } const String…
-
AWS Amplify and Flutter: Parsing Issues with Nested GraphQL Query Results
0 I am trying to execute a simple GraphQL query in my Flutter project. The goal is to get a list of customers with a nested list of devices. However, the results are not being parsed properly and i found some inconsistency between appsync and my project appsync calls. I am pretty new to aws…
-
How do I pass controller without ‘invalid date error’ error
0 I’m trying to pass the date from the datepicker and timepicker but it always gives an invalid date error I already tried .year .month .day .hour. minute. DateTime.parse doesnt wor enter image description here I already tried .year .month .day .hour. .minute parse, toString nothing work import ‘package:datetime_picker_formfield_new/datetime_picker_formfield.dart’; import ‘package:flutter/material.dart’; import ‘package:get/get.dart’; import ‘package:horario/features/Date/presentation/controller/date_controller.dart’;…
-
Flutter Xcode 15 Error (Xcode): DT_TOOLCHAIN_DIR cannot be used to evaluate LIBRARY_SEARCH_PATHS
27 upon upgrading my Xcode today to version 15, I receive the following error when building my app for IOS: Error (Xcode): DT_TOOLCHAIN_DIR cannot be used to evaluate LIBRARY_SEARCH_PATHS, use TOOLCHAIN_DIR instead It appears some specific dependencies are causing this issue, in my case: objectbox_flutter_libs: ^2.2.1 firebase_core: ^2.16.0 I have no idea how to solve…
-
Flutter graphql using cache with hive, when calling query with police ‘cacheAndNetwork’ it always uses the network without the cache
2 Flutter graphql using cache with hive, when calling query with police ‘cacheAndNetwork’ it always uses the network without the cache Here is caple of my code Future<QueryResult> query(String query, {Map<String, dynamic> variables}) async { QueryOptions options = QueryOptions( document: gql(query), variables: variables, fetchPolicy: FetchPolicy.cacheAndNetwork, errorPolicy: ErrorPolicy.none, cacheRereadPolicy: CacheRereadPolicy.mergeOptimistic, ); final result = await _client.query(options);…