-1 I have upgraded spring boot to 3.1.1 and I am getting 405 method not allowed for graphql call. I tried all the known options. pom.xml <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-graphql</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> class @Controller public class DemoGraphQLResolver { @QueryMapping(name = "phoneNumber") public List<Party> phoneNumber(@Argument String phoneNumber) { return phoneNumber; } } I have .graphqls […]
0 Normally when I make a server I have no problem importing route files but I’m working on a project using GraphQL which requires me to include "type": "module", inside my package.json file. So when I try having this inside my app.js file const indexRouter = require("./routes/index"); It gives me this error. ReferenceError: require is […]
1 I am stuck trying to implement graphql with react-apollo and graphcool. I am following this Tutorial My code with the request query looks like this : import React from ‘react’; import { graphql } from ‘react-apollo’ import gql from ‘graphql-tag’ const ALL_INSPECTIONS_QUERY = gql` # 2 query AllInspectionsQuery { allInspections { id date observation […]
4 I use Passport and GraphQL and if I do my own custom guard to get user’s roles it just doesn’t work. I don’t have access to the user from the request in a Guard, is that intentional? I think it should be part of the request (I’m totally new to NestJS), so why I […]
9 I have some C code: #include "stdio.h" typedef struct num { unsigned long long x; } num; int main(int argc, char **argv) { struct num anum; anum.x = 0; __asm__("movq %%rax, %0n" : "=m" (anum.x) : "rax"(2)); printf("%llun",anum.x); } which I’m compiling and running on my (intel) Mac laptop. The output from the code […]
5 I’m rewriting strapi v3 queries to v4 (GraphQL), and with new fields ‘data’ and ‘attributes’, I have a problem going too much deep into nested objects, an example of how data looks: user { data { id attributes { company { data { id attributes { location { data { id … } } […]
0 I’m using the experimental version of graphql and apollo client together with next13 and at one point in my code I perform a mutation in a client side component to delete data and I need the query that was performed in a server side component to be re-done for the list of results to […]
11 I just read code like this: auto value = ({ auto it = container.find(key); it != container.end() ? it->second : default_value; }); What is this ({}) called? I don’t think I’ve ever seen this before. c++ Share Improve this question Follow edited yesterday Hesky Fisher asked yesterday Hesky FisherHesky Fisher 1,02777 silver badges1111 bronze […]
0 I’m trying to create a simple Byline component to use in my MDX posts that displays the site author with a href="mailto:[email protected]" and a time tag with the date the post is given in its frontmatter. I’ve tried following this Gatsby tutorial to learn how to query frontmatter through GraphQL in a component. I […]