Coder Social home page Coder Social logo

Comments (8)

asiandrummer avatar asiandrummer commented on April 28, 2024

Hey @imolorhe - sorry it took a while to get to you. Did you resolve this? The link shows me 404 at the moment.

from codemirror-graphql.

imolorhe avatar imolorhe commented on April 28, 2024

@asiandrummer This is the current link: https://github.com/imolorhe/altair/blob/staging/src/app/components/query-editor/query-editor.component.ts#L134

I've not yet resolved it.

from codemirror-graphql.

asiandrummer avatar asiandrummer commented on April 28, 2024

@imolorhe I couldn't find where you're rendering the autocomplete results, but I'm throwing a random guess that you may be using an incorrect key name for accessing autocomplete result items. Below is the type:

type AutocompleteResultItem = {
  text: string,
  type: GraphQLType,
  description?: string,
  isDeprecated: boolean,
  deprecationReason: string,
};

from codemirror-graphql.

imolorhe avatar imolorhe commented on April 28, 2024

Do I need to specially render it? I just use it as any code mirror add-on. I didn't eclogite l explicitly render the autocomplete.

from codemirror-graphql.

asiandrummer avatar asiandrummer commented on April 28, 2024

You don't if you're using the stock codemirror/show-hint addon and just wanted to render the autocomplete result texts. As shown in show-hint section in the addons page, codemirror won't understand the description key that we're passing from the autocomplete suggestion provider.

GraphiQL uses a custom UI renderer to solve this.

from codemirror-graphql.

imolorhe avatar imolorhe commented on April 28, 2024

Oh okay, makes sense now. Thanks.

from codemirror-graphql.

imolorhe avatar imolorhe commented on April 28, 2024

I guess that bit is missed in the docs for this add on then.

from codemirror-graphql.

asiandrummer avatar asiandrummer commented on April 28, 2024

:D let me know if you have other questions! Closing this for now.

from codemirror-graphql.

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.