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

Downloaded schema misses deprecated directive of field argument #6785

Closed
1 task done
nightroman opened this issue Dec 19, 2023 · 8 comments · Fixed by #6786
Closed
1 task done

Downloaded schema misses deprecated directive of field argument #6785

nightroman opened this issue Dec 19, 2023 · 8 comments · Fixed by #6786

Comments

@nightroman
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Product

Strawberry Shake

Describe the bug

The schema downloaded by strawberryshake.tools misses the expected deprecated directive of a field argument.
Please use the attached project and described steps.
ss-missing-deprecated-directive.zip

The original (now changed) issue: #6302

Steps to reproduce

Start the service:

dotnet run

Download the schema:

dotnet graphql download http://localhost:5000/graphql

Actual result

The field book has the argument authors with no deprecated directive

type Query {
  book(authors: [String!]): Book!
}

Expected result

The field book has the argument authors with the deprecated directive

type Query {
  book(authors: [String!] @deprecated(...)): Book!
}

Workaround(?)

The expected result maybe obtained using the ?sdl query parameter

Invoke-RestMethod http://localhost:5000/graphql?sdl

Relevant log output

No response

Additional Context?

No response

Version

13.8.0

@nightroman
Copy link
Contributor Author

@tobias-tengler @michaelstaib This issue might be fixed before (cannot tell) but it is currently present (reappeared?) in the latest v13.9.7.

I cannot reopen this issue. Should I create a new one, basically the same? Please let me know. Thank you.

@michaelstaib
Copy link
Member

It's not an issue. The tooling uses introspection and introspection does not have the capability for type system directives. You can however use the sdl endpoint which is not specified. It's hotchocolate only.

@nightroman
Copy link
Contributor Author

@michaelstaib
Maybe there are different deprecated directives? Our same method of getting schema (SS download) gets us some deprecated directives as expected and misses directives like in the story.

@michaelstaib
Copy link
Member

So where is the issue ... not following ... what tool do you think is behaving wrong?

@nightroman
Copy link
Contributor Author

nightroman commented Jul 15, 2024

Namely here is the schema result: it has the expected deprecated on Book.someDeprecated but it misses the expected deprecated on Query.book.authors:

schema {
  query: Query
}

type Query {
  book(authors: [String!]): Book!
}

type Book {
  title: String!
  author: Author!
  someDeprecated: String @deprecated(reason: "This is a test.")
}

type Author {
  name: String!
}

@nightroman
Copy link
Contributor Author

nightroman commented Jul 15, 2024

So where is the issue ... not following ... what tool do you think is behaving wrong?

I think it might be StrawberryShake download. I am using the latest "13.9.7"

The ?sdl does return the expected schema with all expected deprecated's.
But we are using and interested in StrawberryShake way of getting schemas.

@nightroman
Copy link
Contributor Author

nightroman commented Jul 15, 2024

@michaelstaib Please find below the attached project (the original with all pieces updated with 13.9.7)
ss-missing-deprecated-directive.zip

@michaelstaib
Copy link
Member

I have checked it ... its fixed in 14. We do not plan to port this back as we release 14 in August.

@ChilliCream ChilliCream locked as resolved and limited conversation to collaborators Jul 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants