Code Monkey home page Code Monkey logo

postgraphile-nest's People

Contributors

alex-ald avatar kuldeeps48 avatar vabatta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

postgraphile-nest's Issues

Add decorator for build.hook('build').

I am using the build.hook('build') to change the BigFloat to Float, but I can't use the same pattern as for the rest. Which is a shame, any chance it could be added?

Integrate native @nestjs/graphql

Is it possible to integrate all the @nestjs/graphql ecosystem into postgraphile?
I want to use my @Resolver()s with @AuthGuard()s along with postgraphile and get one merged schema as output.

Support newer NestJS versions

It is not possible to use NestJS with newer version (alos it works)

npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm ERR! code ERESOLVE                                                     
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: @nestjs/[email protected]
npm ERR! node_modules/@nestjs/common
npm ERR!   @nestjs/common@"^8.2.3" from the root project
npm ERR!   peer @nestjs/common@"^7.0.0 || ^8.0.0" from @nestjs/[email protected]
npm ERR!   node_modules/@nestjs/config
npm ERR!     @nestjs/config@"^1.2.1" from the root project
npm ERR!   3 more (@nestjs/core, @nestjs/platform-express, @nestjs/testing)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @nestjs/common@"^7.6.6" from [email protected]
npm ERR! node_modules/postgraphile-nest
npm ERR!   postgraphile-nest@"^1.0.6" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @nestjs/[email protected]
npm ERR! node_modules/@nestjs/common
npm ERR!   peer @nestjs/common@"^7.6.6" from [email protected]
npm ERR!   node_modules/postgraphile-nest
npm ERR!     postgraphile-nest@"^1.0.6" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\regis\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\regis\AppData\Local\npm-cache\_logs\2022-10-19T09_07_19_528Z-debug-0.log

I have to use npm i --force all the time...

`Playground` vs`graphiql` option

Hello there!

Thank you very much, I was about to write very similar stuff for Admin Panel purpose (will most likely publish ra-data-postraphile pkg as well)

as wiki mentions: playground (optional): set this to true to enable the Playground interface (Defaults to false) - for me this does not work. However, using "native" option graphiql: true takes correct effect - but only if provided together with playground. This is rather strange effect, not sure if desired or has any practical reasons.
I just noticed that if playground and graphiql are both true, both paths are available. I believe it should be consistent with postrgraphi and keep original route instead of playground ๐Ÿค”

Would be happy to assist in "fixing" (or documenting) this is you can drop any hint.

Thanks!

NestJS's global interceptors, guards don't execute

Hi,
So if i configure postgraphile using the official doc like:

**> `For Nest, this might look something like:

import { Controller, Get, Post, Req, Next, Res } from '@nestjs/common';
import { Request, Response } from 'express';
import { PostGraphileResponseNode } from 'postgraphile';
import { middleware } from './postgraphile.middleware';

@controller('/')
export class PostGraphileController {
@get(middleware.graphiqlRoute)
graphiql (@Req() request: Request, @res() response: Response, @Next() next) {
middleware.graphiqlRouteHandler(new PostGraphileResponseNode(request, response, next));
}

@post(middleware.graphqlRoute)
graphql (@Req() request: Request, @res() response: Response, @Next() next) {
middleware.graphqlRouteHandler(new PostGraphileResponseNode(request, response, next));
}
}`**

All my nestjs global interceptors and guards work.

But when i configure postgraphile using your module's forRoot method, none of my global interceptors/guards get executed. I'm able to execute middlewares configured for /graphql but not interceptors/guards.

Any hint would be helpful. Thank you.

Support for subscriptions

Is there any way to extend the schema with my own subscriptions using decorators?
If not - i can help by contributing

extendSchema issue with query or mutation that has arguments.

When specifying a Query or Mutation that can accept arguments, the fieldName is used as the key for the resolver function. This results in errors when trying to execute said Mutation and Query because it can't find the associated resolver.

When changing the following code:

[fieldName]: async (query, args, context, resolveInfo) => {

To this:

[fieldName.match(/^\w+/)[0]]: async (query, args, context, resolveInfo) => {

It works. The above code matches the name of the Mutation or Query. If you want a reproduction, just grab one of your examples from the wiki for extendSchema, they both have arguments and will error out.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.