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

[v2] Limit query by placing caret inside operation not working #243

Closed
arielnmz opened this issue Apr 12, 2019 · 3 comments
Closed

[v2] Limit query by placing caret inside operation not working #243

arielnmz opened this issue Apr 12, 2019 · 3 comments

Comments

@arielnmz
Copy link

arielnmz commented Apr 12, 2019

Version and Environment Details

Operation system:

$ cat /etc/fedora-release&& uname -r
Fedora release 29 (Twenty Nine)
5.0.4-200.fc29.x86_64

IDE name and version:
Pycharm PRO 2019.1

Plugin version:
2.0.0

Expected Behaviour

Placing caret inside an operation and pressing Ctrl+Enter should send only said operation

Actual Behaviour

Query fails:

{
  "errors": [
    {
      "message": "Must provide operation name if query contains multiple operations."
    }
  ]
}

Presumably because it's sending everything in the graphql file

Steps to Reproduce / Link to Repo with Reproduction and Instructions

  1. Create a new .graphql file and add at least two operations:
query query1 { ... }
query query2 { ... }
  1. Place the caret in any place of any operation and press Ctrl+Enter
  2. Operation fails

Note: Selecting and pressing Ctrl+Enter works just fine.

@jimkyndemeyer
Copy link
Collaborator

Hi Benjamín.

Thanks for using the plugin.

Yeah, this didn't make it into the 2.0.0 even though 1.x has it. As you said, the workaround is to select the operation in the editor even though that's not as elegant.

I hope to have this feature back in 2.1.0.

Best regards,
Jim.

@jimkyndemeyer jimkyndemeyer changed the title Limit query by placing caret inside operation not working [v2] Limit query by placing caret inside operation not working Apr 12, 2019
jimkyndemeyer added a commit that referenced this issue Apr 14, 2019
…243, #43, #94)

- Highlight current executable operation and included fragments
- Automatically include referenced fragments, including across files based on resolving PSI references
@jimkyndemeyer
Copy link
Collaborator

I've implemented this for the 2.1.0 release that's scheduled for mid-next week.

The contextual queries are now also capable of including referenced fragments that are declared in other files.

Best regards,
Jim.

@akahan
Copy link

akahan commented Feb 5, 2021

Plugin version: 2.7.1
Idea version: IntelliJ IDEA 2020.3.2 (Ultimate Edition) Build #IU-203.7148.57

Doesn't work on new version of Idea.
When I want to send one of the operation, I put a caret on that operation, but the whole file is sent.

PS: I confirm that if you select the required operation, only that operation is sent. But this is very inconvenient.

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

3 participants