Giter Site home page Giter Site logo

Comments (19)

StringKe avatar StringKe commented on July 20, 2024

在支持标准 GraphqQL 的时候,建议同时支持 subscription 可以使用 SSE 方式。

from solon.

fuzi1996 avatar fuzi1996 commented on July 20, 2024

认领

from solon.

fuzi1996 avatar fuzi1996 commented on July 20, 2024

@noear #176 先不要合并,只是为了让你看看,我打算做完batchloader和订阅再一起合并

from solon.

noear avatar noear commented on July 20, 2024

@fuzi1996 好的!

from solon.

noear avatar noear commented on July 20, 2024

@StringKe @fuzi1996 关于 SSE ,是 graphgl 的订阅规范之一吗?。。。最近,倒是加了 sse 的支持 :

https://solon.noear.org/article/546

from solon.

StringKe avatar StringKe commented on July 20, 2024

@noear 不是规范之一,是客户端单向订阅的一种选择。

from solon.

fuzi1996 avatar fuzi1996 commented on July 20, 2024

@noear 目前的实现有个问题,只能对Conmponent注解的类的方法进行拦截,无法对Controller中方法进行拦截,无法复用Controller中的逻辑。有什么好办法吗?

from solon.

noear avatar noear commented on July 20, 2024

拦截?是可以的

from solon.

noear avatar noear commented on July 20, 2024

你想不加注解,就拦截?还是加注解进行拦截?

from solon.

noear avatar noear commented on July 20, 2024

不管怎么样,Controller 都是可以拦截的。。。

from solon.

noear avatar noear commented on July 20, 2024

你对Conmponent注解的类的,是怎么拦截的。。。放点代码,我看下,然后给你份 controller 拦截的示意代码

from solon.

fuzi1996 avatar fuzi1996 commented on July 20, 2024

你对Conmponent注解的类的,是怎么拦截的。。。放点代码,我看下,然后给你份 controller 拦截的示意代码

https://github.com/fuzi1996/solon/blob/222794a52179e54e5c444ae0bb6272ea7e821676/solon-projects/solon-plugin/graphql-solon-plugin/src/main/java/org/noear/solon/extend/graphql/GraphqlPlugin.java#L42-L49

通过 提取 Bean 的函数进行定制开发 实现

如果使用aop,性能会不会有问题

在spring中只要是在bean中使用Graphql的注解都会生效

from solon.

noear avatar noear commented on July 20, 2024

原来在这里留的言,我还找了半天:)。。。要不这样,你先只支持 @Component 注解好了。。。你提交后,我再看看,调整下。

from solon.

noear avatar noear commented on July 20, 2024

你先只支持 @Component 注解吧。。。你提交后,我再看看,如果有必要再调整。

from solon.

noear avatar noear commented on July 20, 2024

另外。。。就算 spring 所有的 bean 都可以;;;solon 也不一定要对等处理的。。。毕竟是不同框架。。。或许,只限 @Component 更好,也说不定。

//solon 也可以所有 bean 拦取你讲的注解。。。不过我先不提,浪费性能

from solon.

fuzi1996 avatar fuzi1996 commented on July 20, 2024

已完成初步适配

from solon.

fuzi1996 avatar fuzi1996 commented on July 20, 2024

@noear 目前graphql使用还有一个问题,就是只能对Component进行aop,无法对Controller,详见: #90 (comment)

from solon.

noear avatar noear commented on July 20, 2024

@noear 目前graphql使用还有一个问题,就是只能对Component进行aop,无法对Controller,详见: #90 (comment)

@fuzi1996 我大概知道原因了。。。你是拿它当组件用是吧?当组件用时,它没有aop功能。。。mvc 用时,会转成 action 此时才会有 aop 功能

from solon.

noear avatar noear commented on July 20, 2024

已完成。2.8.2

from solon.

Related Issues (20)

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.