Code Monkey home page Code Monkey logo

Comments (2)

vepanimas avatar vepanimas commented on June 2, 2024

Hi @BoD! How will you provide a schema file in your plugin? Will you follow the same approach as the GraphQL plugin?

from js-graphql-intellij-plugin.

BoD avatar BoD commented on June 2, 2024

This is to be determined - but I think the most flexible way would probably to have an API that takes a String as an input, so a plugin could programmatically build this String to handle different cases.

To give your more context, in Apollo Kotlin (and other Apollo tools) we have a generic @link mechanism where a schema can declare to import certain definitions. You can read more about it here. We intend to leverage this mechanism in the future any time we need to add new definitions.

So for instance, in v4 we are adding a new directive @catch, and for users to use it, they'll have to import it this way:

extend schema @link(
  url: "https://specs.apollo.dev/nullability/v0.1", 
  import: ["@catch", "CatchTo"]
)

When doing this Apollo Kotlin will add the @catch directive to the user's schema so it can be used in queries.

The ultimate goal for us would be to have support for this mechanism in the plugin. So when @catch is imported via @link, then it should be recognized in the editor.

I hope this makes sense :)

from js-graphql-intellij-plugin.

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.