Tag: graphql
-
How to create Resolvers for this apollo graphql server
-1 How to Create Resolvers for Apollo GraphQL Server using the Given Output and Type Definitions { "data": { "department": [ { "id": "123", "booksubdepartment": [ { "id": "111", "departmentID": "123", "books": [ { "subdepartmentId":"111", "bookTitle": "Book One on sub department 111" }, { "subdepartmentId":"111", "bookTitle": "Book Two on sub department 111" } ] },…
-
How to upload with ExpediaGroup’s graphql-kotlin?
0 There’s nothing related to file upload in the examples under https://github.com/ExpediaGroup/graphql-kotlin/tree/master/examples/server/spring-server/src/main/kotlin/com/expediagroup/graphql/examples/server/spring. I’d like to upload 5 files at once and although I think it should be a mutation I’m not sure whether it should go like this: class UploadMutation: Mutation { fun upload(files: FilePart) { print("$files") } } The context is obviously Spring Boot…
-
hotchocolate schema stitching with another language server
1 I have a question for a custom scalar converter and schema stitching. I want to stitch a schema from a third party Server and from my own server. But the other server uses Java and a "BigDecimal" Type. And when I load the schema in "banana cake pop" or any other UI tool (postman,…
-
How to create a commit, on newly created empty repository using GitHub Graphql API
0 GraphQL Query I used: mutation CreateGitProfileRepo($name: String!, $description: String!, $homepageUrl: URI!) { createRepository(input: {name: $name, visibility: PUBLIC, description: $description, homepageUrl: $homepageUrl}) { repository { ref(qualifiedName: "main") { repository { id } } } } } I’m getting ref ID as null, as it is an empty repo. Now I’m creating a commit using: mutation…
-
Creating Github Organization using graphql
0 I tried below code to create organization using my github account getting error mutation { createOrganization(input: { login: "besttestzzzz", admin: true }) { organization { id login } } } { "input": { "admin": [ "testgithubaccount" ], "clientMutationId": "", "login": "testgithubaccount" } } I got errors view the below image. github graphql postman github-api…
-
Cannot access to data in title from Strapi with GraphQL and Nuxt.js
0 I have a project with Nuxt, GraphQL and Strapi. I cannot access to a article.data.attributes.title, but I can access to article.data.attributes. I have the error message : undefined is not an object (evaluating ‘_vm.article.data.attributes.title’). Weirdly, when I am updating from article.data.attributes to article.data.attributes.title, it is working, but just when I refresh the page, the…
-
“Package ‘graphql’ support only TS versions that are >=4.1.0”
0 When i run the command npx tsc i get the error "Package ‘graphql’ support only TS versions that are >=4.1.0". But my typescript version is 5.1.6. This is my package.json : { "name": "typescript", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "jest", "start": "ts-node index.ts", "build": "tsc", "migrate": "ts-node -r tsconfig-paths/register ./src/migrations/migrations.ts"…
-
How can I set the name of fields in my schema using Juniper and Rust?
0 I’m currently developing a GQL API in Rust using Actix and Juniper. actix = "0.13.0" juniper = "0.15.11" I’ve managed to create a working environment without issues, however I’ve noticed that Juniper is automatically renaming my Query fields. The code below generates a new field under my QueryRoot which should be named "list_shows" impl…
-
Sharing data between @QueryMapping and @SchemaMapping in Java Spring GraphQL
3 I have a schema defined as follows: enum CardType { TYPE_1 TYPE_2 } type Card { id: ID! } type Order { id: ID! cards: [Card]! } input OrderFilter { cardType: CardType } type Query { getOrders(orderFilter: OrderFilter): [Order] } Also, the following resolvers: @QueryMapping public List<Order> getOrders(@Argument OrderFilter orderFilter) { return this.orderService.get(orderFilter); }…
-
GraphQL circular queries with one to many relationships
1 I’m learning GraphQL by building a simple python application, basically runs nmap scans stores output to a database, and can be queried by a GraphQL API. I seem to be a bit confused on how GraphQL works. I have a few tables that are one-to-many relationships: user has many scans, scans have results, results…