Questions tagged [resolver]
The resolver tag has no usage guidance.
366
questions
-1
votes
1
answer
32
views
What is the difference between Resolver and Service in java [closed]
I have a general question , i noticed that some people are naming classes as Resolver in spring boot application , but in functionality it os the same as in services , the only difference is the ...
0
votes
0
answers
29
views
undefined method `ids' for [#<User id:..] - rails graphql API - why i should add users.to_a in my code
def resolve(where: {}, order_by: {'field': 'updated_at', 'direction': 'desc'})
order_by.symbolize_keys!
[context[:current_user]] unless context[:current_user].has_capability?(self.class.name....
0
votes
0
answers
49
views
Angular 16+ Resolver start before APP_INITIALIZER has end
I'm facing strange behavior when using angular V16 and the new resolveFN.
If I call the page directly from the browser (entering "localhost:4200/customer/123" for example), the resolver is ...
0
votes
1
answer
22
views
AWS Javascript Resolver UpdateItem: The provided key element does not match the schema
I am using the javascript resolver to update an item on the database but am getting this error:
The provided key element does not match the schema.
Resolver request:
export function request(ctx) {
...
1
vote
0
answers
40
views
Microservice Communication for Graphql APIs
Problem Statement : I have a GraphQl query defined which is responsible for fetching few details from the database.
This graphql schema let's say is defined in microservice-B . Now I want this garphql ...
0
votes
1
answer
31
views
Another way of merging graphql resolvers
In many tutorials that I have read, the most common way of using graphql resolvers is like below.
export const rootResolvers: IResolvers = {
Query: {
getUserById: async (root, { id }, context, ...
0
votes
1
answer
20
views
Use default resolver/type resolver for non-nullable field in Apollo in TypeScript
I'm using @graphql-codegen/cli to create a GraphQL API with Apollo. The resolvers are written in TypeScript. I cannot figure out how to use a default resolver to resolve non-nullable fields. The ...
0
votes
0
answers
29
views
Writing a custom resolver for appsync query
I want to add a layer of security to my app (Amplify using appsync) so that only contacts who are part of a specific company can see cases that are a part of that company. My idea is that I query the ...
0
votes
1
answer
154
views
How to use react-hook-form dynamic resolver validation?
I'm using react-hook-form for form submitting, and I need to make the validation work dynamically.
For example, in the form, the category has three options: 'firstCateogory', 'secondCategory', '...
0
votes
0
answers
33
views
PrimeNG p-breadcrumb resolve breadcrumb by a resolver
I'm using PrimeNG v16.0.2 with angular 16 p-breadcrumb component to construct the site breadcrumb.
But some places need to be replaced by a different value than the URL has (name instead the id in the ...
0
votes
0
answers
48
views
How to paginate with hotchocolate using a resolver. I followed the documentation but it doesn't work. What am I doing wrong?
I found the following code in the documentation of hotchocolate at this link
https://chillicream.com/docs/hotchocolate/v13/fetching-data/pagination
public class QueryType : ObjectType
{
...
0
votes
1
answer
18
views
angular resolver does not work with ngrx store observable
I've tried two variations of resolvers
First - without store. It works
// @Injectable({
// providedIn: 'root',
// })
// export class EmptyStateResolver implements Resolve<EmptyState> {
// ...
0
votes
0
answers
44
views
Setting up a local repository for a Scala project in a closed network
I'd like to use scala project in a closed networks. For this, I've tried to setup my local repository using ivy cache(~/.ivy2/cache) as follow steps.
1. Collecting artifacts from the Ivy cache:
Set ...
0
votes
0
answers
212
views
Angular : Testing functionnal resolver?
I'm new to testing with Angular, but i'd like to test a newly generated component. Here are the specs :
describe('MyComponent', () => {
let component: MyComponent;
let fixture: ComponentFixture&...
-1
votes
1
answer
100
views
how to implemet a grpc resolver with etcd in C++?
2 problems:
i've built and install grpc with guide https://github.com/grpc/grpc/blob/master/BUILDING.md, grpc tag is v1.41.0. but i can't find resolver.h nor balancer.h in /usr/local/include/grpc++/, ...
1
vote
0
answers
63
views
Appsync VTL to js resolver with mysql serverless
This is how js resolver file looks like from aws docs:
import {util} from '@aws-appsync/utils';
export function request(ctx) {
console.log("CTX", ctx);
return {};
}
export function ...
-1
votes
1
answer
83
views
C# Json.NET hide objects (not properties) when serializing
I want to hide objects (not properties) when serializing with Json.Net.
The situation is:
In a list of images, there are many images, including attributes such as Class, Name, and Layers. Within the ...
0
votes
0
answers
24
views
Error in Prisma connectOrCreate in nested create
I'm using GraphQL and Prisma to create a backend app. I have Publication, Version and Author models defined in Prisma. Each Publication can have many versions and each version belongs to one ...
1
vote
1
answer
351
views
nestjs graphql set context after logging in interceptor
I would like the @Context to host some auth information such as tokens, users.
I have created a TGqlContext type that is passed when initializing graphql
export type TGqlContext = {
req: Request;
...
0
votes
0
answers
68
views
Configuring nginx to forward to ASP.NET Core 6 application - Resolver error
I am configuring nginx for windows to forward requests to an ASP.NET Core 6.0 app runing in Kestrel
I put this directive in nginx.conf:
server {
listen 80;
location /PassThrough/ {
...
0
votes
0
answers
9
views
Can i use the stoplight default resolver to choose the SECOND value instead of the first?
I am using spotlight's default resolver like this:
model = mergeAllOf(model, {
resolvers: {
defaultResolver: mergeAllOf.options.resolvers.title,
},
It works, but it ...
0
votes
1
answer
65
views
How to use a resolver with angular routing
I have a resolver service that retrieves data from the db in transition, I receive the data in the service but not in the called component - it's undefine in the onInit
export class ...
0
votes
0
answers
640
views
How to repair corrupted mp4 video?
I have a 7 GB mp4 video, but when I put it to Windows Media Player the screen goes black and you do not hear anything, an error comes out that says "There was a problem playing the file in ...
1
vote
1
answer
652
views
Maven writes \u0000 into resolver-status.properties files, failing subsequent builds
I am using MacOS and I am using Maven in version 3.8.7. I am using Java in 11.0.17 by Eclipse Temurin.
Somehow, when building a big Maven project, Maven creates resolver-status.properties files that ...
0
votes
2
answers
2k
views
How to display a progress-spinner while fetching data via a Resolver in Angular 14?
I'm using Angular 14 and PrimeNG 14. In my module, I have the default route created, which is dependent on getting data from a resolver. I would like the user to see a spinner until the data from ...
0
votes
0
answers
26
views
How to decide upon having 1 resolver or resolver for each field in graphql?
What criteria should be considered before deciding to go with 1 resolver for the entire query type or resolvers for each field? What are the advantages & disadvantages of each way of defining ...
0
votes
0
answers
275
views
Validation of a required number using Yup
I'm trying to implement a validation for a float number, Validation schema is like following:
export const getSellingInvoiceDetailsScheme =(total:BigNumber)=>{
return yup.object().shape({
...
3
votes
0
answers
285
views
How to use ValueResolver in another ValueResolver or chain ValueResolver with Symfony
I'm using Symfony 6.2 with php 8.1.
Since the update of SF 6.2 i had to remove SensioFrameworkExtraBundle and migrate my code from ParamConverter to new custom ValueResolver.
However, i'm facing a ...
0
votes
1
answer
462
views
In PrimeNG, how do I display a spinner when waiting for a resolver within a module?
I'm using PrineNG 14. In my main app routes file, I set a path to load a module ...
const routes: Routes = [
{
path: '',
loadChildren: () => import('./products/products.module').then(m =&...
1
vote
0
answers
243
views
How to resolve chained graphql resolvers in an array
In a child resolver in GraphQL, I want to use an API to get the data.
Example schema and resolver:
import { gql,ApolloServer } from "apollo-server";
const typeDefs = gql`
type Review{
...
0
votes
0
answers
39
views
Correct series of DNS resolution after TTL expire
Let's assume that the TTL of google.com expire , then will the resolver go to the root name server for resolving google.com or will it go to the nearest authority that is ns1.google.com assuming that ...
0
votes
1
answer
325
views
Internet Resolver on AWS can't be deleted
[Internet Resolver][1]
Hi ,
How can I delete this , it been trying but I am not getting any suitable way to delete it .Thanks
[1]: https://i.stack.imgur.com/5MigP.png
0
votes
2
answers
187
views
DependencyResolver in ASP.NET Core. Also how to access HTTPConfiguration in ASP.NET Core?
We are migrating our project from ASP.NET Web API to ASP.NET Core 6.0 Web API as part of that we having following below lines of code.
DependencyResolver.SetResolver(new AutofacDependencyResolver(...
1
vote
1
answer
113
views
Difference between provides & output in pathom 3
What is the difference between provides & output here?
#com.wsscode.pathom3.connect.operation.Resolver
{:config
#:com.wsscode.pathom3.connect.operation
{:input [:ip]
:provides {:longitude {}
...
1
vote
0
answers
529
views
Abstract type X must resolve to an Object type at runtime for field X
I'm new to GraphQL, and I've run into the issue mentioned in the title. I've tried all the solutions to the problem and still cannot figure it out. I know it is a duplicate question, but I can't seem ...
1
vote
1
answer
1k
views
Graphql resolveType union: throwing must resolve to an object type at runtime
I'm querying a union type in graphql, data comes from MongoDB database, driver: Mercurius, with Fastify framework. I'm trying to implement a search, by fetching data from 2 different database, for ...
0
votes
1
answer
123
views
Firefox, xPath is not evaluating
I have a problem with document.evaluate function to check xPath validation.
In Firefox, document.createNSResolver is not working properly... I get just xmlDoc nothing else. When I just leave it with a ...
0
votes
1
answer
216
views
How to access data from grandparent in apollo graphql server?
I am trying to access data from grandparent in a grandchild resolver. How do I achieve this?
{
field1
field2 {
child1 {
grandchild1
}
}
}
I want to access ...
0
votes
0
answers
165
views
What is the best way to inject a non-View Service in SwiftUI that can be used in other Views or Services?
Using Swift-5.6.1, iOS-15.6,
Simple question - but not easy answer:
What is the best way to inject a non-View Service in SwiftUI that can be used in other Views or Services ?
We all know how to create ...
1
vote
0
answers
210
views
GraphQL DGS- Kotlin, Modify the parent resultSet, based on Child dataloader results
class UserEntity(val id: UUID, val name: String, val email: String){
val occupation: String? =null
}
class AddressEntity(val id:UUID){
val line1: String,
val line2 : String,
val city: City,
...
0
votes
1
answer
875
views
use child graphql resolver inside any parent resolver - resolver chaining
Let's say I have an author with different books.
I can either fetch a book alone, or fetch an author with its books.
type Query {
author(authorId: ID!): Author
book(bookId: ID!): Book
}
type ...
0
votes
1
answer
107
views
How to write resolver for hyphenated field in Atlas App Services schema?
I have an App Service running on MongoDB Atlas, I'd like to know how I can get rid of a hyphenated field using a custom resolver, as I can't query it in GraphQL since it causes a syntax error.
I found ...
1
vote
1
answer
227
views
Many-to-many mutation resolver for Apollo GraphQL
I have 2 entities: Peas and Pods. They have an implicit many-to-many relationship. At the moment, I'm trying to add already created Peas to a Pod on creation.
Here is my current resolver:
addPod: ...
0
votes
1
answer
615
views
how to import schema and resolvers in graphql-yoga/node?
Since graphql-yoga V1 is no longer supported, I'd want to switch to graphql-yoga/node V2.
I've studied the official documentation on the website, but I'm having trouble migrating from V1 to V2.
Is a ...
1
vote
2
answers
181
views
Why is `urql-cachegraph` `cache.resolve()` expected input / output?
I am following Ben Awad's "Fullstack React GraphQL TypeScript Tutorial" on youtube. It is a few years old, so I am scrambling to modify the code to work with updated packages, specifically ...
3
votes
0
answers
552
views
AppSync vs Apollo GraphQL Performance
AWS makes a case to create a lambda resolver for AppSync that will perform different operations. Since a single query may result in calls to multiple operations, AppSync will invoke the lambda ...
1
vote
2
answers
1k
views
SwiftUI @AppStorage not always persisting value
I'm using @AppStorage with a String property. When changing the value of the property, the view automatically updates to reflect the change as expected. However, the majority of the time it hasn't ...
0
votes
1
answer
2k
views
How to build query as variable (from user Input) in prisma.queryRaw without using queryRawUnsafe
I was trying to query my (postgres) db with a customizable statement built front end.
My resolver gets the built query inside the input param, but when I use the queryRaw method I get this error:
`&...
0
votes
1
answer
274
views
Set return type optional for mutation in resolver
In nestjs resolver I have mutation that generates required type how can i set the mutation optional return type?
@Mutation(returns => appId)
async updateAppId(
@Args('appId') appId: string,
...
4
votes
0
answers
1k
views
How can i test the nestjs-graphql resolver with guard?
This is a sample code of resolver and i want to test this with the jest on nestJS.
@Resolver()
export class UserResolver {
constructor(private readonly userService: UserService) {}
@UseGuards(...