import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:graphql/client.dart'; import '../app/constant.dart'; final graphqlProvider = Provider.family( (_, token) { return GraphQLClient( link: (token != "") ? HttpLink( Constant.baseURLGraphQl, defaultHeaders: { 'Authorization': 'Bearer $token', }, ) : HttpLink( Constant.baseURLGraphQl, ), cache: GraphQLCache(), ); }, );