Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlighting for common IDEs #79

Closed
leebyron opened this issue Aug 13, 2015 · 24 comments
Closed

Syntax highlighting for common IDEs #79

leebyron opened this issue Aug 13, 2015 · 24 comments

Comments

@leebyron
Copy link
Collaborator

This would be a great task to claim for an aspiring contributor.

@rmosolgo
Copy link

🎬 take 1 for Atom https://atom.io/packages/language-graphql

syntax only, looking forward to trying autocomplete :)

@wangyanxing
Copy link

Since I guess lots of people are using GraphGL for Android projects, is it a good idea to make an IntelliJ plugin?

@leebyron
Copy link
Collaborator Author

IntelliJ would be great

@wangyanxing
Copy link

On my way

@Gregoor
Copy link

Gregoor commented Nov 12, 2015

I finished a basic version:
https://github.com/Gregoor/graphql-intellij-plugin

@leebyron: Is it possible that the spec is a bit incomplete in respect to type definitions starting with 'input'? But the grammar at the end was extremly helpful, thanks for that!

@kevinSuttle
Copy link
Contributor

@jimkyndemeyer
Copy link

I've created a GraphQL plugin for IntelliJ IDEA and WebStorm that relies on the JavaScript reference implementation. It provides roughly the same features as Graph_i_QL, including schema-aware completion, error highlighting, and in-editor schema documentation:

https://github.com/jimkyndemeyer/js-graphql-intellij-plugin

The integration between the Java-based plugin and the reference implementation JavaScript parser is available as a Node.js based language service:

https://github.com/jimkyndemeyer/js-graphql-language-service

It might prove useful for enabling GraphQL language features in other IDEs, much like the TypeScript language service did for Sublime and Atom.

@Gregoor
Copy link

Gregoor commented Dec 13, 2015

Awesome, that looks way better than what I did :) I'll try it, as soon as it is approved. Any idea how I can help the ~100 downloaders of my plugin migrate to your plugin?

Edit: I think I'll just put up a notification.

@jimkyndemeyer
Copy link

@Gregoor A notification should do the trick :) How long did it take to get your plugin approved?

In case you want early access to the plugin, it can be downloaded from https://dl.dropboxusercontent.com/u/12996502/js-graphql-intellij-plugin/1.0.0/js-graphql-intellij-plugin.jar

Just add it using "Install plugin from disk..."

@Gregoor
Copy link

Gregoor commented Dec 13, 2015

I think the approval process is bound to their 9-5 work cycle (in the czech republic). At least that's the feeling I got.

Thanks for the direct link.

@jparise
Copy link

jparise commented Dec 31, 2015

I started on a Vim plugin: https://github.com/jparise/vim-graphql

It still needs work but handles file detection, syntax highlighting, and folding pretty well so far.

@abdulhannanali
Copy link

Can some one make a graphql package for lovely sublime text? 😄

@syrusakbary
Copy link

@abdulhannanali I just released a GraphQL package for Sublime Text.
https://packagecontrol.io/packages/GraphQL

Right now is just a syntax highlighter, but we plan to add autocompletion and almost all the capabilities we have with GraphiQL.
Source code: https://github.com/graphql-python/GraphQL-SublimeText

@nicolaslopezj
Copy link

Autocomplete and lint from a GraphQL endpoint in atom.

https://github.com/nicolaslopezj/atom-graphql-autocomplete

example

@jimkyndemeyer
Copy link

@nicolaslopezj That's great news. Would you consider using https://github.com/graphcool/graphql-config#method-2-configuration-via-graphqlrc-file to configure the endpoint?

@nicolaslopezj
Copy link

Yes I will!

@asiandrummer
Copy link

@nicolaslopezj - that looks cool :D I've been working to provide a language service interface for GraphQL that could be used across common IDEs. It'll also support firing up the GraphQL server to cache schema/fragment definitions/etc to be used for validation/autocomplete suggestions. The interface has methods to bring other common IDE features, such as hyperlink/outline views/and etc.

It's been developed and tested with Nuclide, but I thought this could be useful for Atom users as well - it'd be awesome if we can collaborate on making that happen!

@dncrews
Copy link

dncrews commented Jan 20, 2017

For @abdulhannanali and anyone else sad about the Sublime Text highlighter not working, I just released one that does. https://packagecontrol.io/packages/GraphQL

@abdulhannanali
Copy link

@dncrews Thanks a lot @dncrews will surely help people using Sublime but I have long moved to Visual Studio Code ❤️

@astorije
Copy link
Contributor

astorije commented Mar 21, 2017

Derailing this thread a bit because these are not IDEs but since we're talking syntax highlighting, some highlighting libraries as of 21 March 2017:

Let me know if you are aware of other ones.

@borisdan
Copy link

A port of @jimkyndemeyer's GraphQL plugin for IntelliJ IDEA to work with Python files in the JetBrains IDE would be amazing as well.
Currently, the Python client toolset is very lacking, and that is a pain that will interfere with GraphQL's growth.

@armetiz
Copy link

armetiz commented Jul 26, 2018

Could be awesome to see a plugin for PHPStorm !

@benjamindulau
Copy link

@jimkyndemeyer Awesome work! Your plugin changed my life in Javascript. Wondering though, do you think it would be hard work to make it also autocomplete queries in PHP Heredoc ?

Example:

private function getQuery()
{

    $query = <<<'GQL'
query ProgrammesForHome($region: String, $travelStart: DateTime, $page: Int, $limit: Int) {
  programmes(region: $region, page: $page, limit: $limit) {
    total
    page
    limit
    edges {
      node {
        id
        name
        catchPhrase
        price {
          amount
          currency {
            code
          }
        }
        offers {
          id
        }
      }
    }
  }
}
GQL;

    return $query;
}

@leebyron
Copy link
Collaborator Author

leebyron commented Oct 2, 2018

Closing this generic issue since we now have pretty good coverage across many IDEs. Please open future language service issues on specific IDEs!

@leebyron leebyron closed this as completed Oct 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests