Skip to content

[feature request] svelte files (Houdini + Svelte-Kit) #168

Closed
@Hebilicious

Description

@Hebilicious

Hello there!
Thank you for working on such an important part of the graphQL tooling ecosystem.

I'm currently working on a SvelteKit project that uses Houdini as it's graphQL client.
GraphQLSP almost work there, but not quite. A picture is worth a thousands words :

image

It appears that the *.svelte files are not detected (I don't get syntax highlighting), and therefore the fragments return with the TSError : Unknown fragment.

In Typescript files, it appears to work fine and provide a very neat and fast syntax highlighting.
Here's my config :

      {
        "name": "@0no-co/graphqlsp",
        "schema": "./graphql/schema.graphql",
        "templateIsCallExpression": true,
        "template": "graphql"
      }

What would be required to support the script tag of svelte files? (I assume this might extend to the script tag of vue SFC too)

I'm happy to try and contribute the feature, if you can point me in the right direction.

Edit: Investigate it a little more, there's this svelte typescript plugin here, https://github.com/sveltejs/language-tools/blob/master/packages/typescript-plugin/README.md , but I'm not sure how they can "work together".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions