// GetQueries returns acceptable graphql.Fields for Query.
GetQueries returns acceptable graphql.Fields for Query.
// GetQueries returns acceptable graphql . Fields for Query .
func (x *graphql__resolver_UserProfiles) GetQueries(conn *grpc.ClientConn) graphql.Fields {
	return graphql.Fields{
		"user": &graphql.Field{
			Type: Gql__type_UserProfile(),
			Args: graphql.FieldConfigArgument{},
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				var req gql_ptypes_empty.Empty
				if err := runtime.MarshalRequest(p.Args, &req, false); err != nil {
					return nil, errors.Wrap(err, "Failed to marshal request for user")
				}
				client := NewUserProfilesClient(conn)
				resp, err := client.GetUserProfile(p.Context, &req)
				if err != nil {
					return nil, errors.Wrap(err, "Failed to call RPC GetUserProfile")
				}
				return resp, nil
			},
		},
		"userBySub": &graphql.Field{
			Type: Gql__type_UserProfile(),
			Args: graphql.FieldConfigArgument{
				"sub": &graphql.ArgumentConfig{
					Type:         graphql.NewNonNull(graphql.String),
					DefaultValue: "",
				},
			},
			Resolve: func(p graphql.ResolveParams) (interface{}, error) {
				var req GetUserProfileBySubRequest
				if err := runtime.MarshalRequest(p.Args, &req, false); err != nil {
					return nil, errors.Wrap(err, "Failed to marshal request for userBySub")
				}
				client := NewUserProfilesClient(conn)
				resp, err := client.GetUserProfileBySub(p.Context, &req)
				if err != nil {
					return nil, errors.Wrap(err, "Failed to call RPC GetUserProfileBySub")
				}
				return resp, nil
			},
		},
	}
}
func ( x * graphql__resolver_UserProfiles ) GetQueries ( conn * grpc . ClientConn ) graphql . Fields { return graphql . Fields { " " : & graphql . Field { Type : Gql__type_UserProfile ( ) , Args : graphql . FieldConfigArgument { } , Resolve : func ( p graphql . ResolveParams ) ( interface { } , error ) { var req gql_ptypes_empty . Empty if err := runtime . MarshalRequest ( p . Args , & req , false ) ; err != nil { return nil , errors . Wrap ( err , " " ) } client := NewUserProfilesClient ( conn ) resp , err := client . GetUserProfile ( p . Context , & req ) if err != nil { return nil , errors . Wrap ( err , " " ) } return resp , nil } , } , " " : & graphql . Field { Type : Gql__type_UserProfile ( ) , Args : graphql . FieldConfigArgument { " " : & graphql . ArgumentConfig { Type : graphql . NewNonNull ( graphql . String ) , DefaultValue : " " , } , } , Resolve : func ( p graphql . ResolveParams ) ( interface { } , error ) { var req GetUserProfileBySubRequest if err := runtime . MarshalRequest ( p . Args , & req , false ) ; err != nil { return nil , errors . Wrap ( err , " " ) } client := NewUserProfilesClient ( conn ) resp , err := client . GetUserProfileBySub ( p . Context , & req ) if err != nil { return nil , errors . Wrap ( err , " " ) } return resp , nil } , } , } }
GetQueries returns acceptable graphql.Fields for Query.
GetQueries returns acceptable graphql . Fields for Query .