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

if-expressions can lose indentation upon reformatting #349

Closed
matthargett opened this issue Jan 31, 2022 · 0 comments · Fixed by #350
Closed

if-expressions can lose indentation upon reformatting #349

matthargett opened this issue Jan 31, 2022 · 0 comments · Fixed by #350
Labels
bug Something isn't working

Comments

@matthargett
Copy link

A few examples of this in 0.12:

				local function append(cache: ApolloCache<any>, item: Item)
					local data = cache:readQuery({ query = query })
					cache:writeQuery({
						query = query,
						data = Object.assign({}, data, {
							items = Array.concat({}, (function()
								local ref = if Boing.toXYZBoxinf(data) and data ~= nil
										then  data.items
										else data
								return Boing.toXYZBoxinf(ref) and ref
							end)() or {}, { item }),
						}),
					})
					return item
				end
	local error_ = if errors and #(errors :: Array<any>) > 0
		then ApolloError.new({ graphQLErrors = errors })
		else nil
local function useMutation<TData, TVariables, TContext, TCache>(
	mutation: DocumentNode | TypedDocumentNode<TData, TContext>,
	options: MutationHookOptions_<TData, TVariables, TContext>?
): MutationTuple<TData, TVariables, TContext, TCache>
	local context = useContext(getApolloContext())
	local result, setResult = useState({ called = false, loading = false })
	local updatedOptions = if options
		then Object.assign({}, options, { mutation = mutation })
		else { mutation = mutation }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants